定义链接的样式(转贴)
2005-07-03 15:18
369 查看
CSS中用四个伪类来定义链接的样式,
分别是:a:link、a:visited、a:hover和a : active,例如:
a:link{font-weight : bold ;text-decoration : none ;color : #c00 ;}
a:visited {font-weight : bold ;text-decoration : none ;color : #c30 ;}
a:hover {font-weight : bold ;text-decoration : underline ;color : #f60 ;}
a:active {font-weight : bold ;text-decoration : none ;color : #F90 ;}
以上语句分别定义了"链接、已访问过的链接、鼠标停在上方时、点下鼠标时"的样式。注意,必须按以上顺序写,否则显示可能和你预想的不一样。记住它们的顺序是“LVHA”。
分别是:a:link、a:visited、a:hover和a : active,例如:
a:link{font-weight : bold ;text-decoration : none ;color : #c00 ;}
a:visited {font-weight : bold ;text-decoration : none ;color : #c30 ;}
a:hover {font-weight : bold ;text-decoration : underline ;color : #f60 ;}
a:active {font-weight : bold ;text-decoration : none ;color : #F90 ;}
以上语句分别定义了"链接、已访问过的链接、鼠标停在上方时、点下鼠标时"的样式。注意,必须按以上顺序写,否则显示可能和你预想的不一样。记住它们的顺序是“LVHA”。
相关文章推荐
- css中定义超级链接的样式
- 14.定义链接样式
- 第5章—通过CSS定义链接样式
- CSS定义链接的样式
- CSS中a标签样式的“爱恨”原则:定义链接样式的四个伪类
- css定义超级链接a标签里面的title的样式
- CSS中定义链接样式的四个伪类
- css_定义链接样式
- 定义链接的样式是有顺序的
- 用CSS定义链接样式
- CSS中a标签的样式简介 链接定义的顺序
- 网站链接总的CSS定义可定义内容为链接字体颜色样式等
- bootstrap各样式定义的内容
- Eclipse和Android Studio自定义Dialog样式的定义
- 定义页面滚动条样式
- 长见识了,VS链接中的重定义错误
- 获取内联和链接中的样式
- 为什么会出现LNK2005"符号已定义"的链接错误?
- CSS定义链接颜色
- 用CSS指定外部链接的样式代码