Rya*_*yan 7 css iphone mobile-safari media-queries
我正在尝试使用CSS媒体查询,专门针对iPhone.
当我使用常规链接rel时它可以工作:
<link rel="stylesheet" type="text/css" href="css/mobile.css" />
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试此媒体查询时,它不起作用:
<link rel="stylesheet" type="text/css" href="css/mobile.css"
media="only screen and (max-width: 640px)" />
Run Code Online (Sandbox Code Playgroud)
如何使用CSS媒体查询来定位iPhone?
ben*_*der 14
尝试:
<link rel="stylesheet" type="text/css" href="css/mobile.css" media="only screen and (max-device-width: 480px)" />
Run Code Online (Sandbox Code Playgroud)
差异max-device-width不仅仅是max-width.另请参阅http://blogs.sitepoint.com/iphone-development-12-tips/上的2).
| 归档时间: |
|
| 查看次数: |
14792 次 |
| 最近记录: |