HTML CSS 标签点击后变色

关于鼠标点击,会有几个阶段的情况

指正常的未被访问过的链接

1 a:link{
2   text-decoration:none; 
3 }

 

指已经访问过的链接

1 a:visited{
2   text-decoration:none; 
3 }

 

指鼠标在链接上悬停

1 a:hover{
2   text-decoration:none;
3 }

 

指正在点击(未松开)的链接

1 a:active{
2   text-decoration:none;
3 }

在这几种情况下根据需求添加颜色即可!

posted @ 2020-10-16 14:15  俩只猫  阅读(6314)  评论(0编辑  收藏  举报