【问题标题】:validation errors W3c验证错误 W3c
【发布时间】:2020-01-13 06:17:22
【问题描述】:

我收到了错误

解析错误 progid:DXImageTransform.Microsoft.gradient(startColorstr='#007db9e8', endColorstr='#cc000000', GradientType=0) }

这里是代码

.surgeryCategory .card-title.gradient {
    display: block;
    width: 100%;
    background: linear-gradient(to bottom, rgba(125, 185, 232, 0) 0, rgba(0, 0, 0, .4) 50%, rgba(0, 0, 0, .8) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#007db9e8', endColorstr='#cc000000', GradientType=0)
}

【问题讨论】:

  • 您使用的是哪个版本的IE浏览器?我用 div 测试过你的代码,在 IE 浏览器(IE8+)中没有错误显示。此外,参考MDN -ms-filter 和Microsoft Gradient Filter,我们可以看到渐变过滤器从 Windows Internet Explorer 9 开始已被弃用。从 Internet Explorer 10 开始,此功能已被删除,不应再使用。

标签: html css internet-explorer magento-1.9


【解决方案1】:

我忘记在行尾加分号

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#007db9e8', endColorstr='#cc000000', GradientType=0);

【讨论】:

    【解决方案2】:

    这是正确的代码。您忘记在倒数第二行末尾添加分号。

    .surgeryCategory .card-title.gradient {
        display: block;
        width: 100%;
        background: linear-gradient(to bottom, rgba(125, 185, 232, 0) 0, rgba(0, 0, 0, .4) 50%, rgba(0, 0, 0, .8) 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#007db9e8', endColorstr='#cc000000', GradientType=0);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 1970-01-01
      相关资源
      最近更新 更多