經常使用css樣式整理

設置tr的間距:css

.tr {display:block;
     margin-bottom:20px;}
}

設置td的寬度:spa

.td1 {display:inline-block;
      width: 30%;}
.td2 {display:inline-block;
      width:70%;}

first-child表示選擇列表中的第一個標籤例:
code

li:first-child{background:#090}

last-child表示選擇列表中的最後一個標籤。例:ast

li:last-child{background:#090}
nth-child(3)表示選擇列表中的第3個標籤。例:

li:nth-child(3){background:#090}

nth-child(2n) 這個表示選擇列表中的偶數標籤,即選擇 第二、第四、第6…… 標籤。class





持續更新中~~~
margin