核心提示:伪类1、普通的伪类p:nth-of-type(1){}p:nth-of-type(2){}p/pp/p第一个p:first-child{}最后 一个p:last-child{}2、锚伪类a:link{...
伪类
1、普通的伪类
p:nth-of-type(1){}
p:nth-of-type(2){}
<p></p>
<p></p>
第一个
p:first-child{}
最后 一个
p:last-child{}
2、锚伪类
a:link{} 未点击时(常用) a{}
a:visited{} 点击过后
a:hover{} 鼠标悬停(常用)
a:active{} 点击时刻
cursor: pointer; 鼠标经过时呈手型
二级菜单的显示隐藏
display:none; 隐藏
display:block; 显示
通过父级找子级(hover给父级)