Kac*_* G. 6 html css text-decorations
red wavy underline我想用和blue dashed overlineusing来制作文本text-decoration。
这是我的代码:(仅在 Mozilla Firefox 中工作)(不起作用,因为仅显示上划线)
span {
font-size: 40px;
text-decoration: underline wavy red;
text-decoration: overline dashed blue;
}Run Code Online (Sandbox Code Playgroud)
<span> Some Text </span>Run Code Online (Sandbox Code Playgroud)
text-decoration?(我知道,它只能在 Mozilla Firefox 中运行)一个 css 属性不能同时有两个值。
解决方法:将文本包装在另一个文本中span,并向每个范围添加单独的文本装饰:
span {
font-size: 40px;
}
.wavy {
text-decoration: underline wavy red;
}
.dashed {
text-decoration: overline dashed blue;
}Run Code Online (Sandbox Code Playgroud)
<span class="wavy">
<span class="dashed">Some Text </span>
</span>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2092 次 |
| 最近记录: |