<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Firstname</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Anna</td>
</tr>
<tr>
<td>2</td>
<td>Debbie</td>
</tr>
<tr>
<td>3</td>
<td>John</td>
</tr>
</tbody>
</table>
它是從引導例如片段。 注意到它在一個標籤中有多個類,所以這兩個類之間有什麼關係?看來表條紋是表的子類?HTML多類在一個標籤
以及如何將CSS改變這個元素的樣式?請問錶款風格覆蓋表風格嗎?
此外,我應該如何選擇這個類的元素?
很好的回答!根據我的經驗,'.table-striped'通常意味着偶數行和奇數行有不同的背景顏色。 –
它只是「.table-striped」可以提供的「其他」屬性。因爲我的例子只適用於頂層元素,所以後面會出現'.table striped tr td:nth-child(even){// stuff}',這是你在'.table'類中找不到的。 – masterpreenz
如果你覺得它有幫助並回答您的問題,不要忘記將其標記爲答案。 – masterpreenz