我试着让一些@媒体在互联网浏览器11上工作
.content {
border-top: 1px solid #939393;
border-right: 1px solid #939393;
border-left: 1px solid #939393;
border-bottom: none;
margin-top: -60px;
position: relative;
width: 99.7%;
z-index: 97;
}
@media only screen and (max-width: 1330px) {
.content{
width: 99.6%;
z-index: 0;
}
@media only screen and (max-width: 1200px) {
.content{
margin-top: 0px;
width: 99.6%;
z-index: 0;
}
/* Tablet - 800px, 768px & 720px */
@media only screen and (max-width: 960px) {
.content{
margin-top: 0px;
width: 99.6%;
z-index: 0;
}
}
/* Mobile - 480px & 320px */
@media only screen and (max-width: 719px) {
.content{
margin-top: 0px;
width: 99.45%;
z-index: 0;
}
}
/* Mobile - 320px */
@media only screen and (max-width: 479px) {
.content{
margin-top: 0px;
width: 100%;
z-index: 0;
}
}11只读取第一个媒体查询,即最大宽度:1330 if,即使我将屏幕宽度降到最小。
这种情况只发生在互联网浏览器上。火狐,铬,歌剧等。按预期工作,并阅读其他媒体查询。
我是不是遗漏了什么?我怎么才能解决这个问题?
发布于 2014-06-04 19:29:49
您有语法错误,因此IE只解析第一个查询。
关闭你的声明。
@media only screen and (max-width: 1330px) {
.content{
width: 99.6%;
z-index: 0;
}
}
@media only screen and (max-width: 1200px) {
.content{
margin-top: 0px;
width: 99.6%;
z-index: 0;
}
}https://stackoverflow.com/questions/24045911
复制相似问题