[英]media screen and min-width: 965px and max-width: 965px
@media screen and (min-width: 965px){
//style here
}
@media screen and (max-width: 965px){
//some other style
}
every thing works fine in less than or more than 965px but when the screen on 965px bugs appear 小于或大于965px时,一切正常,但是出现965px的屏幕错误时,
is there is any way to fix that 有什么办法可以解决
Switch the order and give yourself 1px of leeway between the 2. 切换顺序,让自己在2之间留出1px的回旋余地。
@media screen and (max-width: 964px){
//some style
}
@media screen and (min-width: 965px){
//style here
}
This way, there is no overlap. 这样,就不会有重叠。
Note: It is not recommended to use bot min and max width in screen size queries. 注意:建议不要在屏幕尺寸查询中使用最小和最大宽度。 If you just use min-width, and list them from smallest to largest, the one below will override the one above it.
如果仅使用最小宽度,并从最小到最大列出它们,则下面的一个将覆盖上面的一个。
Just change the second one to 只需将第二个更改为
@media screen and (max-width: 964px){
that way the y will be kept seperated and won't interfere with each other. 这样,y将保持分离,并且不会互相干扰。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.