【问题标题】:Css Site display correctly at firefox and chrome and Doesn't Display Correctly in IE11Css 站点在 Firefox 和 chrome 中正确显示,但在 IE11 中无法正确显示
【发布时间】:2016-11-23 04:00:40
【问题描述】:

Css 站点在 Firefox 和 chrome 中正确显示,而 Css 在 IE11 中无法正确显示,我在标题中的面包屑在 ie11 中无法正确显示,我不知道为什么。

www.myhotels24.eu/fibe.aspx

【问题讨论】:

    标签: css asp.net internet-explorer-11


    【解决方案1】:

    您需要使用适用于所有浏览器的 css。 linear-gradient 属性仅适用于极少数支持但不是全部的浏览器。

    background: your-color; 
    background: -webkit-linear-gradient(bottom, your-color, white); /* For Safari 5.1 to 6.0 */
    background: -moz-linear-gradient(top, white, your-color); /* For Firefox 3.6 to 15 */
    background: -o-linear-gradient(white, your-color); /* For Opera 11.1 to 12.0 */ 
    background: linear-gradient(top, your-color, white); /* Standard syntax */
    background: linear-gradient(to bottom, your-color, your-color); /* IE ? */
    background: -ms-linear-gradient(top, your-color, your-color); /* IE 11 */
    

    如果您使用这些背景属性,它将适用于所有浏览器。意味着兼容的属性将自动工作自然浏览器。

    【讨论】:

    • 我有另一个属性边界半径在 ie 11 中不能正常工作
    • border-radius 是 css3 属性,IE 10,11 支持此属性但有时会丢失像素问题。无论如何也要尝试以下属性:-ms-border-radius: 10px;
    【解决方案2】:

    问题是跨浏览器渐变:
    将以下 css 替换为背景。

    background: #1e5799; /* Old browsers */
    background: -moz-linear-gradient(left,  #1e5799 0%, #207cca 0%, #b89470 0%, #b89470 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#1e5799), color-stop(0%,#207cca), color-stop(0%,#b89470), color-stop(100%,#b89470)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left,  #1e5799 0%,#207cca 0%,#b89470 0%,#b89470 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left,  #1e5799 0%,#207cca 0%,#b89470 0%,#b89470 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left,  #1e5799 0%,#207cca 0%,#b89470 0%,#b89470 100%); /* IE10+ */
    background: linear-gradient(to right,  #1e5799 0%,#207cca 0%,#b89470 0%,#b89470 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#b89470',GradientType=1 ); /* IE6-9 */***
    

    【讨论】:

      猜你喜欢
      • 2013-10-26
      • 2016-01-15
      • 1970-01-01
      • 1970-01-01
      • 2016-02-27
      • 1970-01-01
      • 1970-01-01
      • 2020-05-19
      • 1970-01-01
      相关资源
      最近更新 更多