我有以下文字:
我早上吃了酸奶
酸奶很好喝
早上喝酸奶有益健康
我想用虚线在“酸奶”一词下划线。
<u>
下划线很容易标签,但我很困惑如何让特定的单词用点加下划线。
最佳答案
一种方法是使用带点的 border .
<ol>
<li>I ate <span class="yogurt">yogurt</span> in the morning</li>
<li><span class="yogurt">yogurt</span> was very nice</li>
<li>eating <span class="yogurt">yogurt</span> in the morning is healthy</li>
</ol>
.yogurt {
border-bottom: 1px dotted #aaa;
}
关于html - 如何在 HTML 和 CSS 中获取带有虚线的特定单词?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15846908/