0

我使用 CSS 设置了一些列表项 (li) 的样式。样式应用于 li 中的 a 选择器。它适用于 Chrome、IE 和 Safari,但不适用于 Firefox:

<ul class="organisations">
   <li class="community-care"><a href="http://adviceglos.org.uk/organisation-type/community-care/" title="View all posts in Community Care" >Community Care</a></li>
</ul>

这是CSS:

ul.organisations li.community-care a {
background-image: -webkit-gradient(linear,center top,center bottom,color-stop(0%,#5CBCC4),color-stop(100%,#38939B));
background-image: -webkit-linear-gradient(#5CBCC4 0,#38939B 100%);
background-image: -moz-linear-gradient(#5CBCC4 0,#38939B 100%);
background-image: -o-linear-gradient(#5CBCC4 0,#38939B 100%);
background-image: -ms-linear-gradient(#5CBCC4 0,#38939B 100%);
background-image: linear-gradient(#5CBCC4 0,#38939B 100%);
background-color: #5CBCC4;
border: 1px solid #318188;
border-bottom-color: #245E63;
}
4

2 回答 2

0

像这样申请-mozfirefox:

background: -moz-linear-gradient(#BF698C 0px, #93506D 100%) repeat scroll 0 0 transparent;
于 2012-10-11T10:37:11.467 回答
0

您的样式表中有语法错误。特别是,第 529 行是:

background-image: -o-linear-gradient((#eeeeee 0,#ccc 100%) !important;

请注意,您的开放括号比封闭括号多一个。在符合规范的 CSS 解析器(不包括 WebKit)中,这会导致 UA 将匹配的 close paren 之前的所有内容视为 background-image 值的一部分。在这种情况下,这就是样式表的所有其余部分,因此忽略此点之后的所有规则。

进一步注意,Firefox 确实在其错误控制台中报告了这个问题,这就是我发现它的方式......

于 2012-10-11T20:02:50.610 回答