css选择器
标记选择器
<style>
a{
front-size:9px;
color:#f97;
}
</style>
类别选择器
```r
```r
```html
<style>
.one{
font-family:宋体;
font-size:24px;
color:red;
}
.two{
font-family:宋体;
font-size:16px;
color:red;
}
.three
{
font-family:宋体;
font-size:12px;
color:red;
}
</style>
</head>
<body>
<h2 class="one">应用了选择器</h2>
<p>正文内容1 </p>
<h2 class="two">应用了选择器</h2>
<p>正文内容2 </p>
<h2 class="three">应用了选择器</h2>
<p>正文内容3 </p>
</body>
id选择器
```html
<style>
#frist{
font-size:18px
}
#second{
font-size:24px
}
#three{
font-size:36px
}
</style>
<body>
<p id="frist">ID选择器</p>
<p id="second">ID选择器2</p>
<p id="three">ID选择器3</p>
</body>
css3 div层控制
```html
<title>使用css2对页面中的文字添加色彩边框</title>
<style>
#boarder{
margin:3px;
width:180px;
padding-left:14px;
border-width:5px;
border-color:blue;
border-style:solid;
height:104px;
}
</style>
</head>
<body>
<div id="boarder"> 文字一<br>
文字二<br>
文字三<br>
文字四<br>
文字五<br>
</div>
</body>