html - 为什么文本装饰被认为是前景的一部分

标签 html css

<分区>

<span>Teaching kids to reach their creative and intellectual potentials through Computer Science.</span>

上面是我的 HTML,下面是我的 CSS:

span { text-decoration: underline; color: red }

如果 text-decoration 被认为是前景的一部分,那么 text-decoration-color 属性如何改变 text-decoration颜色而不改变字体的 color

最佳答案

在 Chrome 上使用 -webkit-text-decoration-color 来改变它。但是,请注意,必须启用实验性 Web 平台功能才能使其工作。所以目前,Chrome 只是简单地不支持这个 css 属性。

关于html - 为什么文本装饰被认为是前景的一部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40369610/

上一篇:css - 如何更改 Rails 中 collection_select 元素的背景颜色?

下一篇:jquery - 如何根据滚动距离更改标题中的 Logo ?

相关文章:

html - 如何使 div 具有报纸背景?

javascript - 如何检测IE6,并显示警报?

html - 如何使粘性导航栏全宽即没有滚动条

html - 将 div 堆叠在一起并相应地对齐下面的 div

html - 为什么这两个元素垂直偏移虽然显示:flex is used?

html - 垂直对齐 bootstrap div 中的内容

javascript - 事件监听器只工作一次

html - 带有图像的按钮

Javascript jQuery 在 IE 中只显示一次图像元素。 FF作品

html - 如何使用 CSS 或 JavaScript 禁用文本选择?