009超链接伪类
代码:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>超链接伪类</title> <link rel="stylesheet" href="../css/014.css"> </head> <body> <img src="../../image/love.jpg" alt=""> <p><a href="#">姓名:李林林</a></p> <p><a href="#">年龄:****</a></p> <p id="price">活了多少天:¥9999</p> </body> </html>
img{ height: 200px; width: 200px; } /* 设置a标签的默认颜色 */ a{ text-decoration: none; color: #FF0000; } /* 鼠标放上去会变色 */ /*设置鼠标悬浮的状态*/ a:hover{ color: #0000FF; font-size: 80px; } /*设置按住未释放的状态*/ a:active{ color: #FF3FC1; }
运行结果: