【问题标题】:Media queries and Safari媒体查询和 Safari
【发布时间】:2015-06-27 03:46:30
【问题描述】:

这是我的index.html

<html>
<head>
    <title>My Website</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" media="screen and (max-resolution: 96dpi)" type="text/css" href="css/app_normal.css"/>
    <link rel="stylesheet" media="screen and (min-resolution: 97dpi) and (max-resolution: 192dpi)" type="text/css" href="css/app_medium.css"/>
    <link rel="stylesheet" media="screen and (min-resolution: 193dpi)" type="text/css" href="css/app_hi.css"/>

这适用于ChromeFirefox(我不在乎IE!)但不适用于Safari。我应该如何纠正这个问题?

谢谢

【问题讨论】:

    标签: html css media-queries


    【解决方案1】:

    Safari 仍部分支持此功能: Link

    来自 caniuse.com:

    虽然标准为此使用最小/最大分辨率,但某些浏览器支持较旧的非标准设备像素比媒体查询。

    【讨论】:

      【解决方案2】:

      查看以下链接媒体查询支持的浏览器

      Browser Compatibility

      【讨论】:

        猜你喜欢
        • 2017-08-11
        • 2014-09-17
        • 1970-01-01
        • 2015-10-09
        • 2017-02-18
        • 1970-01-01
        • 2018-05-19
        • 2020-02-15
        • 2013-12-02
        相关资源
        最近更新 更多