在CSS中,我们可以通过text-decoration属性来让文字下划线。在P标签内添加以下的CSS样式,即可在段落中让文字下划线:p { text-decoration: underline; }
p { text-decoration: underline; }
<p>这是一个<span style="text-decoration: underline;">有下划线的文字</span>,而其他的文字则没有下划线。</p>
<br>
<pre><br> <br>
.class {<br>
text-decoration: underline;<br>
color: red;<br>
}<br>
粉丝
0
关注
0
收藏
0