我想我发现了一个错误:not选择器,我不知道在哪里可以提交CSS中的bug?
文本-修饰将应用于:not中的元素。
看我拼凑的这个小代码,颜色却正确地应用在下划线上。
p {
color: #000000;
}
:not(p) {
color: red;
text-decoration: underline;
}
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
如何使<p>标记中的装饰文本不被<a>标记覆盖? a {
text-decoration: none !important
}
#paragraph {
color: black;
} <p id="paragraph"><a href="#">this is a link</a></p> 我的问题是,我希望文本颜色p是黑色,而不是蓝色。 我找到了这个,但没有有用的How to remove the underline for anchors(links)? 伙计们,请解
我正在尝试在wordpress中自定义一个主题,但我在链接的样式方面遇到了问题。我特别指的是你添加到你的帖子中的链接。我可以改变它们的颜色,但下划线不会消失,尽管有css规则:
a, .entry-meta a, entry-content a {
color: #cc6633;
transition: color .5s linear;
text-decoration: none!important;
}
颜色会改变,过渡效果会起作用,但文本装饰效果不会。而且,下划线会保持不同的颜色(因此该颜色不会应用于下划线)。还有其他人遇到过这个问题吗?谢谢
edit////////
我的头都要炸开了。请检查一下这个小提琴:
section ul li {
text-decoration: underline;
}
section ul li ul li {
text-decoration: none !important;
}
基本上我有一个无序列表,里面还有另一个。我只是想去掉孩子ul上的文本装饰。无论出于什么原因,它都不想工作..我是笨蛋吗?