Chrome中的CSS特性

时间:2014-07-25 17:24:28

标签: css google-chrome

我对CSS特异性有疑问。

此样式位于页面上的<style>标记中。

.m-order-returnable-item .itemdescdetails li {
    padding-bottom: 5px;
}

此样式位于CSS文件中,并从页面链接

div.account ul li {
    margin: 0;
    padding: 0;
    list-style: none;
}

对于padding属性,我希望第一种方式获胜。

第一种风格比第二种风格具有更强的CSS特性,但在Chrome 36中,第二种风格获胜。在Firefox 31中,第一种风格获胜。

编辑:将padding-bottom: 5px 0;更改为padding-bottom: 5px; Chrome现在可以正常运行。但是,即使在错误的版本中,Firefox也能够处理错误。 (根据Firebug,Firefox将padding-bottom: 5px 0;解释为padding: 0 0 5px。我认为Chrome的容忍度较低,这可能是一件好事,或者我不会抓住这个错误!

0 个答案:

没有答案