基本选择器使用一
来源:互联网 发布:淘宝达人好做吗 编辑:程序博客网 时间:2024/06/09 20:58
<!DOCTYPE html>
<html>
<head>
<title>基本选择器使用</title>
<style>
*{margin:0;padding: 0}
.clearfix:after,.clearfix:before{display:table;content:""}
.clearfix:after{clear:both;overflow: hidden}
.demo{width: 250px;border: 1px solid #cccccc; padding: 10px;margin: 20px auto;}
li{list-style: none outside none; float: left;height:20px;line-height: 20px;width: 20px;border-radius: 10px;text-align: center;background: #36;color: green;margin-right: 5px;}
.demo *{background: orange}
/*--元素选择器*/
ul{background: grey}
/*--id选择器*/
#first{background: lime;color: #000}
#last{background: #000000;color: lime}
/*类选择器*/
.item{background: green;color:#fff;font-weight: bold}
.item.important{background: red}
</style>
</head>
<body>
<ul class="clearfix demo">
<li class="first" id="first">1</li>
<li class="active">2</li>
<li class="important item">3</li>
<li class="important">4</li>
<li class="item">5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li class="last" id="last">9</li>
</ul>
</body>
</html>
<html>
<head>
<title>基本选择器使用</title>
<style>
*{margin:0;padding: 0}
.clearfix:after,.clearfix:before{display:table;content:""}
.clearfix:after{clear:both;overflow: hidden}
.demo{width: 250px;border: 1px solid #cccccc; padding: 10px;margin: 20px auto;}
li{list-style: none outside none; float: left;height:20px;line-height: 20px;width: 20px;border-radius: 10px;text-align: center;background: #36;color: green;margin-right: 5px;}
.demo *{background: orange}
/*--元素选择器*/
ul{background: grey}
/*--id选择器*/
#first{background: lime;color: #000}
#last{background: #000000;color: lime}
/*类选择器*/
.item{background: green;color:#fff;font-weight: bold}
.item.important{background: red}
</style>
</head>
<body>
<ul class="clearfix demo">
<li class="first" id="first">1</li>
<li class="active">2</li>
<li class="important item">3</li>
<li class="important">4</li>
<li class="item">5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li class="last" id="last">9</li>
</ul>
</body>
</html>
0 0
- 基本选择器使用一
- JQuery选择器(一) 基本选择器
- jQuery (一、基本选择器)
- jQuery-Selectors(选择器)的使用(一、基本篇)
- 使用Jquery基本选择器
- 使用CSS3基本选择器
- jQuery选择器 过滤选择器(一.基本过滤选择器)
- jquery 基本选择器的使用
- CSS选择器的基本使用
- jQuery基本使用及选择器
- jquery基本选择器的使用
- 使用jQuery基本过滤选择器
- 使用Jquery基本过滤选择器
- jQuery选择器的基本使用
- jQuery基本选择器的使用
- css基础-html中使用css、基本选择器、类选择器、id选择器、通用选择器、符合选择器
- [教程] CSS3 选择器——基本选择器(一)
- jQuery选择器(一)——基本选择器
- svn 设置用户组
- 快速幂
- 提前定义及对象构造顺序
- 指针和引用的区别
- 聊天机器人中对话模板的高效匹配方法
- 基本选择器使用一
- Mysql在大型网站的应用架构演变
- Java中boolean和它的包装类的区别在哪里?
- HDU-2546 饭卡 【01背包模板题】
- 贪心——HDU 5813 ( 2016 Multi-University Training Contest 7 1005 )
- 【刷题】【C++】Distinct Subsequences问题
- android开发环境的搭建
- 欧拉函数算法
- PHP中的self、static、parent关键字