gpt4 book ai didi

html - 如何在悬停时从名称中删除下划线

转载 作者:技术小花猫 更新时间:2023-10-29 11:27:50 24 4
gpt4 key购买 nike

我有这样的 html:

<legend class="green-color"><a name="section1">Section</a></legend>

legend.green-color{
color:green;
}

在我的例子中,Section 看起来是绿色的,但是当我将鼠标指针放在它上面时,它看起来像一个 href,但我希望它保持不变,没有下划线和改变颜色。

是否可以在不更改 css 或最少更改 css 的情况下实现?

或者可能以某种方式使用 jquery?

最佳答案

试试这个:

legend.green-color a:hover{
text-decoration: none;
}

关于html - 如何在悬停时从名称中删除下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7188768/

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