所以我正在为WordPress开发一个关于Divi的网站。
我添加了CSS代码,允许我在主页上设置固定的背景图像,但是,在平板电脑和移动设备上,图像不会覆盖整个屏幕,使页面的一半为白色。有什么方法可以将固定图像也设置为移动设备上的全屏吗?
这是我得到的代码:
.select_page {
visibility: hidden;
}
span.mobile_menu_bar:before {
color: rgba(201,144,0,0.78) !important;
}
.et_mobile_menu {
border-top: 3px solid rgba(201,144,0,0.78);
}
/* First we have to make the main header transparent */
#main-header {
background-color: transparent;
}
#main-header,
#main-header.et-fixed-header {
background-color: transparent;
}
/* Then we turn off the footer */
#main-footer {
background-color: transparent !important;
}
/* Here we make the content of our page builder sections transparent. This is so that the background image shows through */
.et_pb_section {
background-color: transparent;
}
/* Here we set the background image for our specific pages. We also set the background image to cover so that it always fills the screen */
.page-id-15 {
background-image: url("https://ardakarakaya.com/wp-content/uploads/2019/12/ARDA1-1.jpg");
background-size: cover;
}
header#main-header.et-fixed-header, #main-header {
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
}
网站: ardakarakaya.com
亲切问候
担
这个CSS需要改变:
body.custom-background {
...
background-attachment: fixed;
}