在CSS中嵌套@media规则
各种浏览器的支持似乎有所不同。
检查链接
Firefox:黑色,带白色文字。
Opera,Chrome,IE9:蓝色与黑色文本。
哪个是正确的,我将如何使其保持一致?
代码@media screen and (min-width: 480px) {
body{
background-color:#6aa6cc;
color:#000;
}
@media screen and (min-width: 768px) {
body{
background-color:#000;
color:#fff;
}
}}
有趣的是,似乎在条件内嵌套媒体查询@import似乎有效。
例如:
的index.htmlhtml>
Media testWhy is this not consistent.
importer.css@import url(media.css) screen and (min-width: 480px);
media.cssbody {
background-color: #6aa6cc;
color: #000;}@media screen and (min-width:768px) {
body {
background-color: #000;
color: #fff;
}}