Ame*_*e P 16 html css html5 underline css3
我可以创建一个波浪下划线: 
我只能得到一个坚实的边界:
.err {
border-bottom:1px solid red;
display: inline-block;
}Run Code Online (Sandbox Code Playgroud)
<div>A boy whose name was Peter was <div class="err">woking</div> down the street</div>Run Code Online (Sandbox Code Playgroud)
The*_*ick 34
没有背景图片:
.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;
}Run Code Online (Sandbox Code Playgroud)
<div>A boy whose name was Peter was
<div class="err">woking</div> down the street</div>Run Code Online (Sandbox Code Playgroud)
带背景图片:
.err {
display: inline-block;
position:relative;
background: url(http://i.imgur.com/HlfA2is.gif) bottom repeat-x;
}Run Code Online (Sandbox Code Playgroud)
<div>A boy whose name was Peter was <div class="err">woking</div> down the street</div>Run Code Online (Sandbox Code Playgroud)
Sle*_*eek 29
下面是一个没有图像可以实现的方法的示例.根据需要调整.
.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;
}Run Code Online (Sandbox Code Playgroud)
<div>A boy whose name was Peter was <div class="err">woking</div> down the street</div>Run Code Online (Sandbox Code Playgroud)
小智 13
您可以使用CSS text-decoration-style属性.
-webkit-text-decoration-style: wavy;
-moz-text-decoration-style: wavy;
text-decoration-style: wavy;
Run Code Online (Sandbox Code Playgroud)
但是,这仅限于Firefox和Safari.您可能需要考虑使用图像.