[英]css @media screen width doesn't work
I used media queries similar to what's advised here , to create a page that is dependent of screen size. 我使用类似于此处建议的媒体查询来创建一个取决于屏幕大小的页面。
The media query with both an upper and lower limit @media only screen and (min-width: 601) and (max-width: 1249px)
does not work. 上限和下限均为
@media only screen and (min-width: 601) and (max-width: 1249px)
的媒体查询不起作用。 What's wrong? 怎么了?
You need to add a unit of measurement to the min-width
: 您需要将度量单位添加到
min-width
:
@media only screen and (min-width: 601px) and (max-width: 1249px) {
Here is the fiddle (after adding colors just to make it easier to test the queries): http://jsfiddle.net/ffrv703e/7/ 这是小提琴(在添加颜色后只是为了使其更容易测试查询): http : //jsfiddle.net/ffrv703e/7/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.