当满足特定的屏幕尺寸时,我希望我的背景消失。这是我的CSS代码..
@media only screen and (min-width: 0px) and (max-width: 479px) {
.videohome { background-image: none; background-color:#fefefe; }
}
.videohome {
background: url(images/extras/homevideobg.png) repeat-x #e6e6e6;
}
然后当我在屏幕尺寸为 479px 的谷歌浏览器上查看它时;背景还在。。
这是检查元素,
检查元素——谷歌浏览器
www.mysite.com/media="all"
.videohome {
background: url(images/extras/homevideobg.png) repeat-x #e6e6e6;
}
___________________________________
www.mysite.com/media="all"
@media only screen and (max-width: 479px) and (min-width: 0px)
.videohome {
background-image: none; <-- this part is Striked Through
background-color: #fefefe; <-- this part is Striked Through
}
我做错了什么?顺序重要吗?