HTML default link color

前端 未结 3 499
花落未央
花落未央 2021-01-18 06:42

I want to set color of some elements to default link color with CSS.

That color is the same as 

        
3条回答
  •  没有蜡笔的小新
    2021-01-18 07:34

    Even if you don't change the default color, it would still be a good idea to specify the color to ensure that it looks the same in all browsers. I'd put something like this in the stylesheet:

    a, span.link {
      color: blue;
    }
    
    a:visited, span.visited {
       color: purple;
    }
    
    a:active, span.active {
       color: red;
    }
    

    Then you can style spans as links by Your fake link

提交回复
热议问题