在a:visited,只有一个更改是工作 [英] In a:visited , only one change is working

查看:92
本文介绍了在a:visited,只有一个更改是工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改锚定标签的颜色,并在访问链接后模糊图片。但唯一的颜色是变化,图像看起来是一样的。
这是我的CSS代码

I want to change the color of the anchor tag and blur the image after visiting the link. but the only color is changing and the image looks the same. this is my CSS code

<style>
   .image123{
      padding-left:80px;
   }

   .imgContainer{
      float:left;
      margin: 93px; 
    }

    a:link{
      color:#000;
      text-decoration:none;
    }

    a:visited { 
      color:#fafafc ;
      text-decoration:none;
      opacity:0.2 ;
      filter:alpha(opacity=60);
  }

</style>

这里是我的HTML部分

here is my HTML part

<a href="breakdown_assistance_ins.php" id="ba" name="ba" >
    <img src="images/breakdwn_assiatance.png" style="height:100px; width:100px;"/>
    <p>Breakdown </p>
</a>

任何人都可以告诉我为什么我不能模糊的图像和帮助我做同样的原因

Can anyone tell me the reason why I couldn't blur the image and help me to do the same?

推荐答案

向您的标签添加 display:inline-block; $ b

add display:inline-block; to your a tag

  .image123{
      padding-left:80px;
   }

   .imgContainer{
      float:left;
      margin: 93px; 
    }

    a:link{
      color:#000;
      text-decoration:none;
    }

    a:visited { 
      color:#fafafc ;
      text-decoration:none;
      opacity:0.2 ;
      filter:alpha(opacity=60); 
     }

    a{
       display:inline-block; /* or block */
     }

这篇关于在a:visited,只有一个更改是工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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