## 媒體查詢:
```
@media 設置響應式 (媒介查詢)
@media screen and (){ //and后面必須用空格否則沒用
}
```
案例:
如果文檔寬度小于 300 像素則修改背景顏色(background-color):
```
@media screen and (max-width: 300px){
??? body{
background-color:lightblue;
??? }
}
```
1.1、 大型設備(大臺式電腦,1200px 起)
@media screen and (min-width:1200px){ … }
1.2、中型設備(臺式電腦,992px 起)
@media screen and (min-width:992px){ … }
1.3、小型設備(平板電腦,768px 起)
@media screen and (min-width:768px) and (max-width:900px) { … }
1.4、超小設備(手機,小于 768px)
@media screen and (min-width:480px){
html {font-size: 16px; }
}
- 簡介
- 文字三屬性(顏色,字號,字體)
- 盒子三屬性(width , height, background-color)
- CSS引入方法
- CSS選擇器
- css高級選擇器
- CSS的繼承性
- 顏色屬性color
- 字體font-family
- 字號font-size
- 文字在盒子行高 line-height
- 字體加粗font-weight
- 字體樣式font-style
- 文本段落對齊text-align
- 文字修飾(上劃線下劃線中劃線 text-decoration)
- 文字縮進text-indent
- 盒子模型的寬度與高度width,height
- 內邊距padding
- 邊框border
- 外邊距margin
- 清除默認樣式
- 盒子height高度屬性拓展
- 文字在盒子里居中text-align:center
- 盒子在盒子里的水平居中
- margin塌陷
- 標準文檔流display
- 浮動float
- 浮動元素性質
- 浮動貼邊原理
- 浮動元素的標準流問題(文字圍邊效果)
- 清除浮動
- 清除浮動影響二: clear屬性
- 清除浮動overflow方法
- 偽類標簽
- background-color背景顏色屬性
- background-image 背景圖片調用
- background-repeat 背景圖平鋪狀態
- background-position背景定位
- background-attachment背景附著
- background綜合語法
- 相對定位position:relative
- 絕對定位position:absolute
- 定位壓蓋順序
- CSS制作LOGO超鏈接妙招
- CSS公共類的繼承性
- em單位
- 媒體查詢
- flex布局