今天是第四天,進度可以,表揚一下自己。
今天的課程目標是:掌握 CSS 稍微復雜的一些選擇器,還有背景,邊框等一些 CSS 樣式屬性。
CSS背景:
背景色:background-color:gray;
背景圖:background-image:url(www.......);
背景顏色漸變:
div {
background-image: linear-gradient(to bottom, orange, yellow);
}
背景圖像重復:background-repeat: repeat-y/x/no-repear;
背景圖片定位:background-position:center(值有很多,可參考:http://www.w3school.com.cn/cssref/pr_background-position.asp
背景圖片相對可視區固定: background-attachment:fixed; 默認值是scroll,隨下拉圖片滾動。
邊框:
border-style: double; 邊框樣式,可以設置dashed等。
border-width:thick;設置邊框寬度。
border-color: rgb(25%, 35%,45%); 設置邊框顏色。如果設置為transparent,邊框是透明的。
?