【问题标题】:My css is not working in IE browser我的 CSS 在 IE 浏览器中不起作用
【发布时间】:2016-07-19 09:18:29
【问题描述】:

各位,我的 CSS 无法在 IE 浏览器上运行。在ChromeFirefox 中它工作正常,但在IE 中它没有应用单一样式。如果您有任何解决方案,请告诉我。

【问题讨论】:

    标签: css internet-explorer


    【解决方案1】:

    兄弟……你用的是哪个版本的IE? IE 不太支持 HTML 5。请浏览以下链接,可能会对您有所帮助:

    header/footer/nav tags - what happens to these in IE7, IE8 and browsers than don't support HTML5?

    html5 new elements (header, nav, footer, ..) not working in IE

    还有这个

    http://www.impressivewebs.com/html5-support-ie9/

    【讨论】:

      【解决方案2】:

      是的,某些 css 不能在 IE 旧版本中运行。所以IE浏览器需要使用--webkit来支持css

      例如。

      /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#d5cea6+0,c9c190+40,b7ad70+100;Brown+3D */
      background: #d5cea6; /* Old browsers */
      background: -moz-linear-gradient(top, #d5cea6 0%, #c9c190 40%, #b7ad70 100%); /* FF3.6-15 */
      background: -webkit-linear-gradient(top, #d5cea6 0%,#c9c190 40%,#b7ad70 100%); /* Chrome10-25,Safari5.1-6 */
      background: linear-gradient(to bottom, #d5cea6 0%,#c9c190 40%,#b7ad70 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d5cea6', endColorstr='#b7ad70',GradientType=0 ); /* IE6-9 */
      

      在此处添加背景渐变以支持 IE

      background: linear-gradient(to bottom, #d5cea6 0%,#c9c190 40%,#b7ad70 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d5cea6', endColorstr='#b7ad70',GradientType=0 ); /* IE6-9 */
      

      【讨论】:

        猜你喜欢
        • 2014-04-05
        • 1970-01-01
        • 2013-09-09
        • 2013-01-21
        • 2017-01-07
        • 2011-04-30
        • 2015-05-20
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多