css基礎:
id選擇器:用#定義(結合div)
class選擇器:用.定義(結合div)
背景:background-color:背景色;background-image:背景影象;background-repeat:背景重複;background-position:位置;background-attachment關聯
文字:text-intent:縮排;text-align:水平對齊;word-spacing:字間隔;letter-spacing:字母間隔;text-transform:大小寫轉換;text-decoration:文字裝飾
字型:font-family:字型;font-style:傾斜;font-weight:加粗;font-size:字型大小
列表:list-style:屬性;list-style-type:標誌型別;list-style-image:影象標誌;list-style-position:標誌位置
**:border:邊框;border-collapse:摺疊邊框;text-align:水平對齊;vertical-align:垂直對齊
輪廓:outline:輪廓屬性;outline-color outline-style outline-width
css框模型:
框模型:element padding(內邊距) margin(外邊距) border(邊框)
內邊距:padding: top right bottom left
邊框:border: border-style;border-width;border-color
外邊距:margin: top right bottom left
定位:position: static relative(相對定位) absolute(絕對定位) fixed(固定定位)overflow(溢位區域(auto))
浮動:float: left right none inherit(except ie)
css選擇器:
元素選擇器:*:萬用字元
類選擇器:.
id選擇器:#
屬性選擇器:[attribute]
後代選擇器:h1 em
子元素選擇器:h1 > strong 結合:table.company td > p
相鄰兄弟選擇器: h1 + p
偽類:a:link;a:visited:{};a:hover{};a:active{}
css高階:
對齊:(1)margin-left:auto;margin-right:auto;(2):position:absolute;(3):float:right;
尺寸:height:元素高度;line-height:行高;max-height:元素最大高度;max-width:元素最大寬度;min-height:元素最小高度;min-width;width
分類:display:inline none block;float;clear;cursor;position;visibility
導航欄:
CSS 基礎知識
選擇器 元素選擇器 p 後代選擇器 li a id選擇器 intro some text 類選擇器 dateposted 24 3 2006 偽類選擇器 a link 通用選擇器 浮動 定位 框模型 定位的四種模型 相對定位 relative 相對定位的座標原點 該元素在普通流中的位置 特別點 元素...
CSS基礎知識
css規則有兩個主要的部分組成 選擇器,以及一條或者多條宣告h1 css內部的注釋以 開始,以 結束p id選擇器,通過 來選擇html元素 username class選擇器,通過 來選擇一組class元素.center 指定特定的html元素使用classp center 引入外部樣式表 rel...
CSS基礎知識
css特性 css有兩大特性,繼承性和層疊性。css的繼承性,指的是子元素繼承了父元素的某些樣式。css中具有繼承屬性的三大類 1 文字相關屬性 font family,font size,font style,font weight,font,line height,text align,text...