Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Responsive design @媒体查询奇怪地覆盖了另一个,但只是纵向的_Responsive Design_Device Orientation - Fatal编程技术网

Responsive design @媒体查询奇怪地覆盖了另一个,但只是纵向的

Responsive design @媒体查询奇怪地覆盖了另一个,但只是纵向的,responsive-design,device-orientation,Responsive Design,Device Orientation,正在覆盖中非常不同的指令 @media screen and (min-width: 320px)and (max-width:480px){ css instructions } 但不是 @media screen and (min-width: 480px) and (max-width:640px) and (orientation:portrait){ css instructions } 我想这和480有关,但我“我对设备的宽度非常具体,所以不明白为什么会发生这种情况。还有另

正在覆盖中非常不同的指令

@media screen and (min-width: 320px)and (max-width:480px){
 css instructions
} 
但不是

@media screen and (min-width: 480px) and (max-width:640px) and (orientation:portrait){
 css instructions
}

我想这和480有关,但我“我对设备的宽度非常具体,所以不明白为什么会发生这种情况。还有另一个通用结构css文件,它保存所有设备的主样式,但由于某种原因,被覆盖的不是读取这些样式,而是读取320/480规则。任何建议都是好的

我可能是它们重叠了,
max width:480px
min width:480px
当浏览器出现重叠时,是否会偏向第一条规则?为什么不测试像
(最小宽度:320px)和(最大宽度:479px)
(最小宽度:480px)和(最大宽度:640px)
@media screen and (min-width: 480px) and (max-width:640px) and (orientation:landscape){
 css instructions
}