gpt4 book ai didi

css - 右键单击更改 anchor 链接颜色

转载 作者:行者123 更新时间:2023-11-28 12:22:17 26 4
gpt4 key购买 nike

在 Chrome/FF 中对链接使用 a:active 可以在右键单击链接并在新选项卡中打开时设置链接的颜色以显示它已被单击。然而,在 IE 中,这并不相同。有什么想法吗?

最佳答案

jsFiddle Demo

$(document).on("mousedown", "a",
function (e) {
if (e.button == 2) {
$(this).css("color", "red");
return false;
}
return true;
});

关于css - 右键单击更改 anchor 链接颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18790799/

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