css 定义方法

<style type = "text/css">
 
</strle>

<h1 style = "font-size:18px ; Xxx : xxx;">


class , id

<div>
<span>

<strong>


(1) class   namespace  rule :

.className1 {
 color : blue
 }
 
.className2 {
 font-family : Arial;
 }
 
h3.className2 {
 font-family : Arial;
 }
example:
<div class = "className1">
 <h2 class ="className2">ClassName2  of style </h2>
    <h3 class ="className2">ClassName3  of style </h2>
</div>

(2) id   namespace rule :

#next {
 font-size : large;
 }
 
<a href = "next.html"  id = "next"> The  next page </a>

(3) other namespace rule :

h1 {
 font-size : 20px;
 }
 
* {
 color : blue;
}
 <h1> Title name </h1>
 
 (4)  style is common
 
 h1, h3, .heading, #headline {
 font-family : Arial;
 font-color :green;
 }
 

posted @ 2013-03-08 15:22  小磊631  阅读(153)  评论(0)    收藏  举报