首页 > 解决方案 > 如何使用 ap 标签中的类替换 css 中设置的“下划线”

问题描述

我想在<span>标签下方的<p>标签中使用类元素来替换父级<p>标签中设置的下划线。下面是我的代码:

#instru_topp p span:last-child {
  text-decoration: underline;
}
<div id="instru_topp">
  <h3>The topping</h3>
  <p><span class="especial">Mix</span> all the -- <span>Ingredients</span> and pour it on the top cake. After bakin it, you will end up with this:</p>
</div>

标签: htmlcss

解决方案


推荐阅读