CSS:层叠样式表 将显示样式与内容分开
基本语法:
选择器{
规则;
}
①标签选择器:以HTML标签名为选择
<style>
    p{
        color: red;
    }
</style>
<body>
   <p>你好</p>
</body>②id选择器:一次性的 以#号定义
<style>
    #p1{
        color: red;
    }
</style>
<body>
    <p>2</p>
   <p id="p1">你好</p>
</body>③类选择器(单类、多类)用"."标识
<style>
    .p3{
        color: red;
    }
</style>
<body>
    <p>2</p>
   <p class="p3">你好</p>
</body>(或p.p3{})
④属性选择器 a[href]{} :a标签含href才变色 a[href="URL"] 指定url的a标签才变色
派生选择器:li strong{} li元素中的strong元素样式变色
常用字体属性:
font-size:20px
font-style:italic
font-weight:bold
font-family:宋体
文本属性
text-align
列表属性
list-style-type
背景
color
background-color
background-image
HTML引入CSS
1 在<style>标签内定义
2 <div style="background-color:red"><div>
3 <head>中引入外部css文件
<head>
<title>Document</title>
<link type="text/css" rel="name" href="URL.css">
</head>
 盒子模型: margin border padding content  (top left right bottom)
 盒子模型: margin border padding content  (top left right bottom)

浮动: float left right
clean:both



















