我有一个网站,其中移动视图我想要不同的图像和桌面视图,我想另一个。
对于桌面视图,以下HTML/CSS代码可以很好地工作:
HTML:
<div class="et_pb_section et_pb_section_0 demo-request-backgroundimage et_pb_with_background et_section_regular">
</div>
CSS:
div.et_pb_section.et_pb_section_0 {
background-image: url(/wp-content/uploads/2018/05/contactusheader-2-min.jpg)!important;
}
我现在试图为移动视图实现的是,我想要调用下面的CSS,但是我不确定为什么在移动视图中没有调用下面的背景图像。
@media only screen and (max-width: 767px)
{
.demo-request-backgroundimage
{
background-image: url(/wp-content/uploads/2018/05/mobilecontactusheader.jpg) !important;
background-size: cover;
background-repeat: no-repeat;
}
}
https://stackoverflow.com/questions/50596577
复制相似问题