第n-of-type不是在媒体查询内部工作,而是在IE8中同一css文件的媒体查询之外工作。
<script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js" ></script>
和css:
.j-container:nth-of-type(1), .j-container:nth-of-type(3) {
background-color: #eee;
}/* It is working */
@media screen and (max-w
我希望在我的css文件中包含简单的媒体查询,但它们不起作用,我已经从其他问题中挖掘了太长时间的答案。
这是我正在尝试的媒体查询,我认为这是最正确的:
@media screen and (max-width: 600px) {
body {
background-color: red;
}
}
我也尝试过上面代码的这些版本:
@media screen and (max-width: 600px) {
body {
background-color: red !important;
}
}
@media only screen and (max-width: 6