如何用HTML和CSS中的虚线获取特定单词?
问题描述:
我有以下文字:如何用HTML和CSS中的虚线获取特定单词?
我吃酸奶早上
酸奶是非常好的
早上吃酸奶是健康
我想要用虚线强调“酸奶”一词。
只要用<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;
}
http://stackoverflow.com/editing-help – 2013-04-06 04:09:11