网页基础(十二)超链接伪类

超链接伪类就是在超链接中设置未点击状态 点击状态等样式

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--
        	作者:[email protected]
        	时间:2020-02-27
        	描述:语法:标签名:伪类{ 样式}
        	同时设置四种伪类超链接样式 注意书写顺序 爱恨原则 
        	love hate
        -->
        <style>
        	/*未访问前的样式*/
        	a:link{
        		color: black;
        		text-decoration: none;
        		
        	}
        	/*访问后*/
        	a:visited{
        		color: blue;
        	}
        	/*鼠标悬浮*/
        	a:hover{
        		color: red;
        		text-decoration: underline;
        	}
        	/*鼠标单击未释放*/
        	a:active{
        		color: orange;
        		text-decoration: underline;
        	}
        </style>
	</head>
	<body>
		<a href="#" >百度</a>
		<a href="#" >新浪</a>
		<a href="#" >淘宝</a>
	</body>
</html>

未点击

鼠标指向时

鼠标单击未离开时

鼠标单击后

发布了13 篇原创文章 · 获赞 0 · 访问量 110

猜你喜欢

转载自blog.csdn.net/qq_41440413/article/details/104530438