W3 CSS验证错误解析错误

时间:2015-12-21 17:04:22

标签: html css

当我尝试验证以下代码时:

   .cd-stretchy-nav ul a { (line 186)
    position: relative;
    display: block;
    height: 50px;
    line-height: 50px;
    padding: 0 calc(1em + 60px) 0 1em;
    color: white;
    opacity: 1;
    font-size: 1rem;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    transition: color 0.2s;
}

    .cd-stretchy-nav ul a::after { (line 200)
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    right: 22px;
    top: 50%;
    -webkit-transform: translateY(-50%) scale(0);
    -moz-transform: translateY(-50%) scale(0);
    -ms-transform: translateY(-50%) scale(0);
    -o-transform: translateY(-50%) scale(0);
    transform: translateY(-50%) scale(0);
}

我收到了这些错误。

191 .cd-stretchy-nav ul a Parse Error calc(1em + 60px)0 1em;

200 分析错误[:白色;不透明度:1; font-size:1rem; -webkit-transition:颜色0.2s; -moz-transition:颜色0.2s;过渡:颜色0.2s; } .cd-stretchy-nav ul a :: after]

究竟是什么导致了这些错误?代码在网站上运行良好。

1 个答案:

答案 0 :(得分:1)

问题是W3C提供的CSS3验证服务存在错误。有关详细信息,请参阅https://www.w3.org/Bugs/Public/show_bug.cgi?id=18913

据我所知,您的CSS calc值没有任何问题,第二个错误可能是该服务的假阴性响应造成的。