小编ral*_*len的帖子

@Media min-width&max-width

我有这个@media设置:

HTML:

<head>
  <meta name="viewport" content="width=device-width, user-scalable=no" />
</head>
Run Code Online (Sandbox Code Playgroud)

CSS:

@media screen and (min-width: 769px) {
    /* STYLES HERE */
}

@media screen and (min-device-width: 481px) and (max-device-width: 768px) { 
    /* STYLES HERE */
}

@media only screen and (max-device-width: 480px) {
    /* STYLES HERE */
}
Run Code Online (Sandbox Code Playgroud)

使用此设置它可以在iPhone上运行,但它在浏览器中不起作用.

是因为我已经device在meta中了,也许还有max-width:480px

css mobile media-queries

207
推荐指数
5
解决办法
94万
查看次数

标签 统计

css ×1

media-queries ×1

mobile ×1