A:访问过的链接-不透明度不起作用 [英] a:visited links - opacity not working
问题描述
我试图做到这一点,以便在访问链接时,它始终具有某种颜色和某种不透明度,可以在WebKit完全转换它们时与未访问的链接相匹配.
I'm trying to make it so that when a link has been visited, it is persistently a certain color AND a certain opacity that matches non-visited links when WebKit fully transitions them.
使用此:
a:visited {
color:#cc7839;
opacity:0.1;
}
我可以使访问的链接始终是该颜色,除了不透明度没有任何作用.我将其设置为0.1,以便更轻松地查看其是否正常运行.
I can get the visited links to always be that color, except opacity isn't doing anything. I set it to 0.1 to make it easier to see if it was working.
当我将鼠标悬停在访问的链接上时,它会转换为WebKit为a:link:hover设置的不透明颜色.
When I hover over a visited link, it transitions to the opaque color set by WebKit for a:link:hover.
这是另一个文件中的CSS,用于设置所有链接:
Here's the CSS that's in another file for setting all links:
a:link:hover,a:hover,a:visited:hover {
color: #cc7839;
opacity:0.8;
text-decoration:none;
-webkit-transition:all 0.5s ease-in;
-moz-transition:all 0.5s ease-in;
}
我想我必须在后面的CSS上更改某些内容,以指定哪个a
元素?
I'm thinking I have to change something with the latter CSS in terms of which a
elements it specifies?
推荐答案
不可能.您只能使用:visited
选择器来更改元素的颜色.因此不透明度不起作用.
Not possible. You can only use the :visited
selector to change the color of an element. Thus opacity doesn't work.
SEC7115
:visited和:link样式只能在颜色上有所不同.
:visited and :link styles can only differ by color.
此处引用 -找不到说明它的W3文档.
Reference here - Was unable to find W3 documentation stating it..
这篇关于A:访问过的链接-不透明度不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!