gpt4 book ai didi

html - jQuery 按钮 href 文本

转载 作者:太空宇宙 更新时间:2023-11-04 05:19:23 25 4
gpt4 key购买 nike

我有一个 href 链接作为 jquery 按钮

$("a.button, button, input:submit", "div").button();

<a href="/Home/Acton" class="button">Back</a>
<button name="submit" id="continue" value="continue">Continue</button>

结果我得到了:

enter image description here

所以问题是 href 中的 Back 文本不是白色的,为了解决这个问题,我添加了下面的样式。

/*jQuery buttons a href style fix*/
a.button:link {color: #fff !important;}
a.button:hover {color: #026890;}

我可以在 firebug 中看到应用了样式,但这没有帮助,Back 文本仍然不是白色。

问题是,当 Back 处于悬停状态时,它看起来不错,但当不处于悬停状态时,文本应该是白色的,就像 Continue 一样,但事实并非如此.

我该如何在 CSS 中解决这个问题?

最佳答案

您没有将a:visited设置为白色,这就是为什么您会遇到这种情况,您也可以将a:hover设置为#026890

那么试试看:

/*jQuery buttons a href style fix*/
a.button:link {color: #fff !important;}
a.button:visited {color: #fff !important;}
a.button:active {color: #026890 !important;}
a.button:hover {color: #026890 !important;}

关于html - jQuery 按钮 href 文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7022090/

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