作者:慧萍书群415 | 来源:互联网 | 2023-05-24 23:10
我可以创建一个波浪下划线:
我只能得到一个坚实的边界:
.err {
border-bottom:1px solid red;
display: inline-block;
}
A boy whose name was Peter was
woking
down the street
1> The Pragmati..:
没有背景图片:
.err {
display: inline-block;
position: relative;
}
.err:before {
content: "~~~~~~~~~~~~";
font-size: 0.6em;
font-weight: 700;
font-family: Times New Roman, Serif;
color: red;
width: 100%;
position: absolute;
top: 12px;
left: -1px;
overflow: hidden;
}
A boy whose name was Peter was
woking
down the street
2> Sleek Geek..:
下面是一个没有图像可以实现的方法的示例.根据需要调整.
.err {
border-bottom:2px dotted red;
display: inline-block;
position: relative;
}
.err:after {
content: '';
width: 100%;
border-bottom:2px dotted red;
position: absolute;
font-size: 16px;
top: 15px; /* Must be font-size minus one (16px - 1px) */
left: -2px;
display: block;
height: 4px;
}
A boy whose name was Peter was
woking
down the street
3> 小智..:
您可以使用CSS text-decoration-style
属性.
-webkit-text-decoration-style: wavy;
-moz-text-decoration-style: wavy;
text-decoration-style: wavy;
但是,这仅限于Firefox和Safari.您可能需要考虑使用图像.
现在可以在Chrome浏览器中使用