CSS链接边框样式不工作在:访问 [英] CSS link border style not working on a:visited

查看:113
本文介绍了CSS链接边框样式不工作在:访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是链接边框样式,我可以改变它悬停,但:访问的边界不工作。这里是我有的例子:

Problem is with link border styles, I can change it on hover, but the border on :visited doesn't work. Here is example of what I have:

a:link {
    color: #536DFE;
    text-decoration: none;
    border-bottom: dashed 1px;
    transition: all .3s ease-out;
}

a:hover {
    border-bottom: solid 1px;
    transform: scale(1.08);
}

a:visited {
    color: #727272;
    border-bottom: solid 1px;
}

问题是最后的 a:visited border-bottom:solid 1px 被忽略。如何解决这个问题?

The problem is the last a:visited, border-bottom: solid 1px is ignored. How can this be fixed?

推荐答案

border-style 您可以覆盖访问的伪类

MDN


注意:浏览器严格限制可以使用此伪类选择的元素应用的样式:只有颜色,背景颜色,边框颜色,边框底部颜色,边框左边颜色,边框右边颜色, border-top-color ,大​​纲颜色,列规则颜色,填充和笔触。还要注意,alpha分量将被忽略:使用未被访问的规则的alpha分量(除非当不透明度为0时,在这种情况下,整个颜色被忽略,并且使用未被访问的规则)。

Note: For privacy reasons, browsers strictly limit the styles you can apply using an element selected by this pseudo-class: only color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, outline-color, column-rule-color, fill and stroke. Note also that the alpha component will be ignored: the alpha component of the not-visited rule is used instead (except when the opacity is 0, in that case the whole color is ignored, and the one of the not-visited rule is used).

另外 隐私权和:访问过的选择器

这篇关于CSS链接边框样式不工作在:访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆