CSS樣式

1、前景圖與背景圖
div{
border: 2px solid red; //設置背景圖邊框
width:1500px;
height:1500px;
background-color: black; //設置背景圖的顏色
background-image: url("../images/guang.png"); //插入前景圖
background-size:1500px 1500px; //改變前景圖的尺寸大小
background-repeat: no-repeat; //設置前景圖爲單個不重複
background: url("../images/guang.png") no-repeat; //簡寫前景圖設置
}
2、CSS文本
CSS文本屬性包括color(顏色),direction(字體位置),line-height(設置行高,垂直居中可調),text-align(水平方向的移動,可調水平居中),text-decoration(下劃線,上劃線,中間劃線),text-indent(縮進元素中文本的首行,可用於圖片覆蓋技術),text-transform(控制元素中的字母)
例:p{
color: rgb(208,34,87);
direction: rtl;
line-height: 100px;
text-align: center;
text-decoration: underline;
text-indent: -300px;
text-transform: lowercase;
}
結果會出現相應的格式
3、css字體
CSS 字體屬性定義文本的字體系列、大小、加粗、風格(如斜體)和變形(如小型大寫字母)。
例:p{
font-size:30px;
font-style:italic;
font-weight:bolder;
}
結果會出現相應的格式
4、css列表
CSS 列表屬性容許你放置、改變列表項標誌,或者將圖像做爲列表項標誌。
例:li{
list-style-image:url(「圖片路徑」);
list-style-posion:inside;css

相關文章
相關標籤/搜索