css之常见选择器

来源:互联网 发布:js 写cookie 编辑:程序博客网 时间:2024/05/17 23:01

1.标签选择器: input { }

2.id选择器: #id{ }

3.class 选择器: .class{}

4标签+class选择器 input.class{}

5 包含选择器 

P strong {}

<P> 123<strong>57</strong></p>

6 组合选择器

 h1,h2, input { }

<h1>你好</h1>

<input type='text' value='test'>

7.伪选择器

a:visted ,点击过的样式

a: active, 选中超链接时的状态

a:link, 超链接 未被访问时候的状态

a:hover: 鼠标移动到超链接时候的状态


•A:visited {TEXT-DECORATION: none}
•A:active {TEXT-DECORATION: none}
•A:link {TEXT-DECORATION: none}
•A:hover {TEXT-DECORATION: underline}


其他入text 文本框的 focus

0 0
原创粉丝点击