我确定这非常简单,但我无法弄清楚如何操作,也没有找到相关帮助。如何在链接中选择强标记并在悬停时更改颜色
我有一个链接。链接中的一些文本位于<strong>
标记内。 <strong>
文字有一种颜色。在悬停时,<strong>
文字不会改变颜色。我如何让它改变颜色?
a:link {
color: rgb(25, 50, 50);
text-decoration: none;
}
a:visited {
color: rgb(25, 50, 50);
text-decoration: none;
}
a:hover {
color: rgb(100, 200, 200);
text-decoration: none;
}
a:active {
color: rgb(100, 200, 200);
text-decoration: none;
}
strong {
color: rgb(50, 100, 100);
}
<li><a href="xyz.html"><img src="resources/logo.jpg"><div class="list_text"><strong>Heading</strong><br>Sub heading</div></a></li>
我想strong标签内的文本上悬停,并积极为彩色为“副标题”文本RGB(100200200)相同。
您希望强标记中的文本在链接的任何部分悬停时发生更改,还是仅当强标记中的文本悬停时才更改? – j08691
我希望所有文本(强标签内部和外部)在悬停时更改颜色。 – Markeee