首页  >  问答  >  正文

关于link和visited属性

<!doctype html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>CSS样式规则</title>
   <style>
/*link未访问的时候*/
a:link{
          color: black;
text-decoration: none;
}
       a:visited{
           color:red;
font-size:150%;
text-align: center;
}
       a:hover{
           font-wight:bolder;
font-size:200%;
color: pink;
text-decoration-line:underline;
text-decoration-color: darkgreen;
}
       a:active{
           color: deeppink;
font-size:250%;
}
   </style>
</head>
<body>
<p >
    <a href="http://www.php.cn" target="_blank" >php中文网欢迎您</a>
</p>
</body>
</html>

大家帮我看下这串代码,怎么点击之前也是红色,点击之后还是红色,也不居中,悬停和点击效果正常,求解?

益伦益伦2484 天前1178

全部回复(2)我来回复

  • 橘ふ丢孒

    橘ふ丢孒2017-12-07 11:09:13

    <p align="center">
        <a href="#" >php中文网欢迎您</a>
    </p>

    改个文件名或者换个浏览器再打开看看点击之前是不是红色

    回复
    0
  • 益伦

    可以换了ie正常,可能是之前点过缓存了

    益伦 · 2017-12-10 19:35:33
  • 取消回复