【问题标题】:Parallax Website - fix Background images for Interent Explorer 10 mobileParallax 网站 - 修复 Internet Explorer 10 移动版的背景图像
【发布时间】:2013-09-17 13:04:40
【问题描述】:

对于 iPad 和其他设备,由于性能问题,我禁用了背景图像的滚动。一切正常。

如何禁用 IE10 和 IE10 移动设备(平板电脑)的滚动?

【问题讨论】:

    标签: html css internet-explorer user-agent parallax


    【解决方案1】:

    在您的 HTML 文件中使用条件注释。

    如果浏览器代理是/不等于 IE10,则包含/排除 CSS 文件

    <head>
        <![if !IE]>
            <link rel="stylesheet" type="text/css" href="nonIE.css" />
        <![endif]>
        [if IE]>
           <link rel="stylesheet" type="text/css" href="IE.css" />
        <![endif]-->        
        <link rel="stylesheet" type="text/css" href="shared.css" />
    </head>
    

    然后在每个浏览器特定的 css 文件中,您可以根据需要启用任何功能。

    或者使用“display:none;”在 css 元素上,在条件 css 中将其完全隐藏在浏览器中。

    注意:条件 cmets 是 IE 独有的功能,其他浏览器将其视为普通 HTML 标签。

    上面的 sn-p 是从这里借来的:http://codebox.org.uk/pages/articles/conditional-comments,这篇文章比我讲的详细得多。这是一本很好的小书。

    【讨论】:

      猜你喜欢
      • 2011-06-14
      • 1970-01-01
      • 1970-01-01
      • 2015-04-28
      • 2012-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-16
      相关资源
      最近更新 更多