我想隐藏段落标记的嵌入式CSS背景图像以隐藏在移动设备上。我应该如何实现?
<div class="items-body">
<p
style={{ background: `url('${item.image.childImageSharp.fluid.src}') no-repeat right 30px` }}
><Content source={item.sectiontext} /> </p>
</div>
我在一个单独的CSS文件中尝试了此操作,其中定义了item-body CSS但没有更改
@media screen and (min-width: 320px) {
.items-body p{
background: URL ('');
}
}
或
@media screen and (min-width: 320px) {
.items-body p{
background: none;
}
}
答案 0 :(得分:1)
您可以使用Runtime.getRuntime ().exec ("ipconfig/release");
覆盖内联样式
答案 1 :(得分:0)
使用!important
@media screen and (min-width: 320px) {
.items-body p{
background: none !important ;
}
}