html - CSS 选择性问题

标签 html css

<分区>


这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助 future 的读者。

关闭 9 年前

我在处理一些 CSS 代码时遇到了一些问题。我试图让特定类别的链接为红色,而其余链接为蓝色。这是我的代码:

a
{
    text-decoration: none;
    color : blue;
    cursor: pointer;
}

a.headerLink
{
    text-decoration: none;
    color: "#983030";
    font-weight: bold;
    padding-right: 20px;
}

a.headerLink 应该对它有更多的选择性,所以颜色属性会覆盖它,但事实并非如此。更重要的是,它只发生在颜色上。 padding 和 font weight 属性是正确的,但出于某种原因,颜色没有被覆盖。有人知道为什么吗?

最佳答案

使用 validator .

不得引用 CSS 颜色。

color: "#983030";

应该是

color: #983030;

关于html - CSS 选择性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23375480/

上一篇:javascript - 用 JavaScript 点击一个 div

下一篇:html - 选择除少数元素之外的每三个元素(在无序列表中)

相关文章:

html - 如何在 Angular 2 中分离两个独立组件的 CSS?

jQuery 用动画改变 DIV 背景

html - 使用 CSS 在多行中显示元素

javascript - 如何创建可滚动的覆盖内容?

css - Liferay 样式导航栏下 zipper 接

html - :not selector css not working on field selection

javascript - 将文本区域内容下载为批处理文件 onclick

html - Css循环动画

html - 你能用 ruby​​ 更改导航链接的 HTML 类吗

html - 表中的边距很大,如何让它变小?