首页 > 解决方案 > 在单页wordpress上更改图像背景

问题描述

我有一个 ID 页面为“68”的页面,我想更改此页面的背景。

我试过这个,但没有用...


.page-id-68 > img#fsb_image {
    min-height: 100%;
    min-width: 1024px;
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

或这个

.page-id-68 {
background-image:url(https://laportedessecrets.fr/wpcontent/uploads/202003/Photo-escalier-livre.jpg);
background-repeat: no-repeat;
}

你有什么主意吗 ??

标签: csswordpress

解决方案


您只需使用以下代码:

.post-id-68 {
background: #000000;
}

或者,如果您想在背景中添加图像,则可以使用:

.post-id-68 {
background: url('image path');
} 

or

.post-id-68 {
background-image: url('image path');
}


推荐阅读