html中a标签的四个伪类

时间:2026-02-14 22:35:10

1、伪类:伪类用于向被选中元素添加特殊的效果。(元素在特定情况下才具备的)

如图分别是将a标签的link、hover、active、visited修改后的样式 

html中a标签的四个伪类

html中a标签的四个伪类

html中a标签的四个伪类

html中a标签的四个伪类

2、a标签的四个伪类之link 

即未访问(默认)的a标签样式

html中a标签的四个伪类

html中a标签的四个伪类

3、a标签的四个伪类之hover

即鼠标悬停(鼠标滑过) 的a标签样式

html中a标签的四个伪类

html中a标签的四个伪类

4、a标签的四个伪类之active

即链接激活(鼠标按下)的a标签样式 

html中a标签的四个伪类

html中a标签的四个伪类

5、a标签的四个伪类之visited

即访问过后(点击过后)的a标签样式

html中a标签的四个伪类

html中a标签的四个伪类

© 2026 阿力知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com