gpt4 book ai didi

css - 如何在将光标保持在上方的同时设置 anchor 标记颜色

转载 作者:太空宇宙 更新时间:2023-11-03 17:52:56 25 4
gpt4 key购买 nike

我是新 CSS 。我做了一些编码

 #IconHover:hover {
background-color: #F18B13;
color: #fff;
height: 50px;
width: 180px;
}
a:hover {
color: #fff;
text-decoration: none;
}

<table id="IconHover">
<tr>
<td><img src="~/content/iconmaster/user_info.png" width="50" height="50" /></td>
<td style="padding:10px;"
@Html.ActionLink("Personal Identity", "PersonalIdentity", "PersonalData")</td>
</tr>
</table>

这段代码运行良好。 当我保持光标时,背景颜色在改变,但文本颜色没有改变, 当我将光标保持在文本上方时,只有颜色发生变化,但我想当我将光标保持在图像上时,文本颜色应该变为白色?

谁能帮我解决这个问题?

最佳答案

您还需要为 #IconHover:hover a 添加一个类:

#IconHover:hover a
{
color: #FFF;
text-decoration: underline;
}

http://jsfiddle.net/29cquvsf/ 查看 JSFiddle .

关于css - 如何在将光标保持在上方的同时设置 anchor 标记颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26925360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com