【发布时间】:2021-04-25 18:23:40
【问题描述】:
我有这些代码:
<nav role="navigation" class="toc">
<span class="toc-title">Title:</span>
<ul>
<li><a href="">Some Text <textstyle>non-underlined text</textstyle></a></li>
</ul>
</nav>
我希望当鼠标悬停在<li> 元素上时,只有Some Text 会加下划线,而textstyle 元素内的文本不会加下划线。
我试过了:
textstyle:hover, li a textstyle:hover, a > textstyle:hover{text-decoration: none;}
【问题讨论】:
标签: css html-lists underline