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

标签 css internet-explorer anchor

在 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/

相关文章:

css - 伪元素中的字体系列

internet-explorer - 无法在 IE 8 中显示来自 HTTPS 的 PDF(在 64 位 Vista 上)

html - 在单个网页上的iframe中单击即可播放youtube视频

javascript - 强制用户按 <ol> <li> 顺序单击 <a> 链接

javascript - 有什么方法可以通过 Javascript 或 CSS 更改浏览器打印设置

javascript - 如何以水平方式溢出元素?

css - 2 div 在除 IE6 之外的所有系统中都水平排列?怎么解决?

javascript - 在另一个 html 中查看 html 页面

css - IE 中按钮上的背景图像边距

node.js - <a>标签和get请求的区别