我使用table-stripped
與Twitter Bootstrap。Bootstap - 不能得到「表條紋」
我可以使用懸停的任何其他元素,沒有table-striped
但是當我使用table-striped
和一些元素不能被激活。
其原因如下:table-striped
You can see on JSFiddle for demo
我該如何解決這個問題?
我使用table-stripped
與Twitter Bootstrap。Bootstap - 不能得到「表條紋」
我可以使用懸停的任何其他元素,沒有table-striped
但是當我使用table-striped
和一些元素不能被激活。
其原因如下:table-striped
You can see on JSFiddle for demo
我該如何解決這個問題?
這是因爲CSS的特殊性。
提高你的CSS選擇器的特異性值或使用!重要的,如果你懶到覆蓋引導CSS選擇器。
table.table.table-striped tr.myTip td {
background: red;
}
或
.myTip td {
background: red !important;
}
我們如何製作除選定的褪色顏色? – Editor
我不明白,你是什麼意思? – slashsharp
是否可以在沒有選定的情況下減少其他人的不透明度?只有它纔會被選中紅色。其他人的不透明度將是「0.5」是否有可能? – Editor
其實你撥弄不加載bootstrap.css文件。
table-striped
是自舉類,但這樣你就創建了類table-striped
.table-striped>tbody>tr:nth-child(odd)>td,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #e1e1e1;
}
一個css通過在應用程序加載的引導文件是不是在你的應用程序中加載,你只需要更改CSS選擇器通過
.myTip > td, .myTip > th {
background-color: red;
}
這裏是Demo鏈接
你所說的 「保證」 是什麼意思? –