【发布时间】:2010-03-20 18:51:05
【问题描述】:
简单的问题:我有以下标记...
<a href='#'>
<img src='icon.png'> This is the link
</a>
我想让文本在鼠标悬停时变为下划线。
什么是 CSS 选择器,只选择 <a> 元素中的文本而不选择其他内容?如果没有必要,我宁愿不把它包起来。
a:hover {
text-decoration: none;
}
a:hover <select_text_here> {
text-decoration: underline;
}
【问题讨论】:
标签: html css css-selectors