CSS3基礎知識,
CSS3基礎1 樣式表的使用1.內聯樣式表。
隻影響單個元素,常用於標籤。
<p>border-style屬性:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit
3. 元素內邊界
內容與邊框的空隙,與外邊界屬性類似。
padding: 40px;
設定一個的時候表示上下左右距離一樣,也可以用分別設定上下左右邊界距離。
padding: 40px 30px 20px 60px;
4. 內容的寬度、高度設定
在設定邊框的時候可以一同定義內容的寬高度。
div.a{
background:hsla(120,35%,50%,0.2);height: 20px;width:200px;
margin-bottom: 10px;/*外邊界定義*/
margin-left: 20px;
margin: 0 auto;
padding: 40px 30px 20px 60px;/*內邊界定義*/
height: 100px;/*寬高度定義*/
width: 100px;
border: 50px #ADADAD;/*邊框定義*/
border-style: solid dotted double dashed;
}
5. 列表樣式
常見的列表屬性值
list-style-type /*設定引導列表的符號類型*/
list-style-image /*選擇映像作為項目的引導符號*/
list-style-position /*決定清單項目縮排*/
常見的列表符號屬性
Circle 設定類型
Square 映像
Decimal 阿拉伯數字
Lower-roman 小寫羅馬數字
Wpper-roman 大寫羅馬數字
Lower-alpha 小寫字母
Wpper-alpha 大寫字母
None 不現實項目符號
Disc 實心圓
在style中使用列表樣式
List-style-type:decimal;
註:
//-ms代表ie核心識別碼
//-moz代表Firefox核心識別碼
//-webkit代表Google核心識別碼
//-o代表歐朋【opera】核心識別碼
//統標識語句句寫符合w3c標準
2017-11-15