不透明度a:访问 [英] opacity a:visited

查看:247
本文介绍了不透明度a:访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法得到不透明的工作:在Firefox或IE



访问的超链接如果我设置的背景颜色:访问它将工作正常,



这里是我的css:

  a.photo 
{
display:inline-block;
}
a.photo img
{
border:1px solid#C8C8C8;
background-color:#ffffff;
}
a:hover.photo img,
a:active.photo img {
background-color:#FF2D59;
border:1px solid#FF2D59;
}
a:visited.photo img
{
opacity:0.4;
filter:alpha(opacity = 40); / *对于IE8及更早版本* /
}
a.small img
{
width:80px;
height:80px;
padding:6px;
}


< a href =#class =photo small>
< img src =http://www.w3schools.com/css/klematis.jpgalt =小照片超链接/>
< / a>

我不认为CSS的顺序有什么问题,因为如果我添加一个背景颜色,它工作正常:

  a:visited.photo img 
{
opacity:0.4;
filter:alpha(opacity = 40); / *对于IE8及更早版本* /
background-color:Gray;
}


解决方案


SEC7115::visited和:链接样式只能根据颜色不同。某些样式不适用于:访问。


这是从IE的开发工具控制台。我很相信Firefox的显示类似的错误。



对不起。在那里不能做得太多。


I can't get opacity to work on a:visited hyperlinks in firefox or IE

If I set the background color of a:visited it will work fine, but the opactity will not set.

Any ideas?

Here is my css:

a.photo
{
    display: inline-block;
}
a.photo img
{
    border: 1px solid #C8C8C8;
    background-color: #ffffff;
}
a:hover.photo img, 
a:active.photo img {
    background-color: #FF2D59;
    border: 1px solid #FF2D59;
}
a:visited.photo img 
{
    opacity: 0.4;
    filter: alpha(opacity=40); /* For IE8 and earlier */
}
a.small img
{
    width: 80px;
    height: 80px;
    padding: 6px;
}


<a href="#" class="photo small">
    <img src="http://www.w3schools.com/css/klematis.jpg" alt="small photo hyperlink" />
</a>

I dont think there is anything wrong with the order of the CSS , becuase if I add a background color , it works just fine:

a:visited.photo img 
{
    opacity: 0.4;
    filter: alpha(opacity=40); /* For IE8 and earlier */
    background-color: Gray;
}

解决方案

SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.

This from IE's Developer Tools console. I'm pretty sure Firefox's shows a similar error.

Sorry. Not much can be done there.

这篇关于不透明度a:访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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