Css详解之(伪类选择器)
来源:互联网 发布:it infra 编辑:程序博客网 时间:2024/05/23 12:45
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css"> /* 伪类选择器:伪类选择器就是对元素处于某种状态下进行样式的。 注意: 1. a:hover 必须被置于 a:link 和 a:visited 之后2. a:active 必须被置于 a:hover 之后 */ a:link{color:#F00} /* 没有被点击过---红色 */a:visited{color:#0F0} /* 已经被访问过的样式---绿色 */ a:hover{color:#00F;} /* 鼠标经过的状态---蓝 */ a:active{color:#FF0;} </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><a href="#">百度</a></body></html>
伪类选择器案例:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><style type="text/css" > table{background-color:#CCC;//设置背景色border-collapse:collapse;//设置边框合并border:3px;}tr:hover{//鼠标经过变色background-color:#06F;}</style> <body><table border="1px" width="400px" height="300px" align="center" > <tr> <th>姓名</th> <th>成绩</th> <th>人品</th> </tr> <tr> <td>张三</td> <td>98</td> <td>差</td> </tr> <tr> <td>李四</td> <td>50</td> <td>极好</td> </tr> <tr> <td>综合测评</td> <td colspan="2">不错</td> </tr> </table> </body></html>
0 0
- Css详解之(伪类选择器)
- CSS选择器详解(伪类)
- CSS选择器之【伪类/元素选择器】
- CSS:CSS选择器之【伪类/元素选择器】
- CSS伪类选择器之属性选择
- css选择器-伪类选择器
- CSS伪类选择器
- CSS-伪类选择器
- CSS选择器&伪类
- CSS-伪类选择器
- CSS伪类选择器
- CSS伪类选择器
- CSS伪类选择器
- CSS伪类选择器
- CSS-伪类选择器
- CSS 伪类选择器
- css3学习 之 css选择器(结构性伪类选择器)
- Css详解之(选择器)
- HDU 2546 饭卡
- 欢迎使用CSDN-markdown编辑器
- Linux下的TCP/IP编程----基础篇
- 在Qt中使用ActiveX控件
- Android 切换软键盘 以及关闭
- Css详解之(伪类选择器)
- TableLayout布局详解
- Red Hat Enterprise Linux 7.0 安装方法
- 排序算法(冒泡 插入 快速 归并)java
- IOS-百度地图API用点生成线路、导航、自定义标注 2013年11月更新
- Java动态代理
- Mysql 基础语法
- UVA 624(记录路径)
- Http请求的