1
我正试图隐藏仅在移动视图中使用的背景图像。隐藏某些媒体查询值中的背景图像
html{
background: #fff url('//www.xxxxxxxxx.xxx/gray.jpg') center top no-repeat;
background-attachment: initial;
background-size: contain;
background-position-y: 0;
}
但是,当我这样做:
@media (max-width: 425px){
background: transparent !important;
}
背景不能识别的查询规则设置HTML。我怎样才能做到这一点?我究竟做错了什么?
Alberto,我已经更新了标题以更具体到您的问题。如果我错过了某些东西,请随时回滚。 –