2016 08 10 css選擇器練習——常用屬性
阿新 • • 發佈:2018-12-25
作業一:
作業三:
作業七:
/*設定字間距*/
letter-spacing:10px;
/*
設定中劃線
text-decoration是用來設定劃線的,常用的還有uderline和none
*/
text-decoration:line-through;
/*加粗*/
font-weight:bold;
作業二:
/*設定背景圖片*/ background-image:url('01.png'); /* 設定div邊框 注意:這裡必須要設定白色邊框,這樣下面的margin-top和margin-left 才會有效,否則背景圖片會和後來的邊框一起移動。 */ border:1px solid white; /*內邊距*/ padding:10px; /*外邊距(與div的距離)*/ margin-top:15px; margin-left:20px;
作業三:
/*斜體,另一屬性為italic*/
font-style:oblique;
/*字行高*/
line-height:50px;
/*div的邊框*/
border:3px solid black;
作業七:
/*table中*/
/*單元格間距*/
border-collapse:collapse;
/*單元格寬度*/
width:650px;
/*表格居中*/
margin: 0 auto;
/*
另外需要顯示錶內線則需要每行表中都插入border
*/
border:1px solid #70AA39;
/*背景色*/
background-color:#A7C942;