課程
/前端開發
/Bootstrap
/玩轉Bootstrap(基礎)
在不更改基本樣式表的基礎上怎么快速更改斑馬線背景顏色呢?
2016-03-03
源自:玩轉Bootstrap(基礎) 2-20
正在回答
我覺得bootstrap也只是算是被美化了的一個默認樣式吧,你可以為表格設個id 或者class另外自己來設置想要樣式就不會影響其他的表格了吧
社稷師 提問者
:host /deep/.table-striped > tbody > tr:nth-of-type(odd){ ? background:#f9fcfe;}
a.css這樣覆蓋就可以了
自己再新建一個CSS文件如a.css 然后把bootstrap斑馬線的這段語句
.table-striped > tbody > tr:nth-of-type(odd) {
? background-color: #f9f9f9;
}
復制進去a.css, 然后改類名 你想要的顏色,如
.table-striped-red > tbody > tr:nth-of-type(odd) {
? background-color: red;
最后<tabel> 增加class→ <table calss="table table-striped-red">就好了。。但是 這個方法 hover效果好像就失效了
css文件里面有個color 改變里面的例如#333 這種數值什么的
舉報
告訴你使用Bootstrap,并且能夠獨立定制出適合自己的Bootstrap
6 回答怎么改變表格斑馬線的顏色
5 回答如何改變顏色
3 回答斑馬線表格
3 回答請問如何給字體改變顏色
2 回答改變他的顏色或背景顏色
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-03-16
我覺得bootstrap也只是算是被美化了的一個默認樣式吧,你可以為表格設個id 或者class另外自己來設置想要樣式就不會影響其他的表格了吧
2017-06-20
:host /deep/.table-striped > tbody > tr:nth-of-type(odd){
? background:#f9fcfe;
}
a.css這樣覆蓋就可以了
2016-05-16
自己再新建一個CSS文件如a.css 然后把bootstrap斑馬線的這段語句
.table-striped > tbody > tr:nth-of-type(odd) {
? background-color: #f9f9f9;
}
復制進去a.css, 然后改類名 你想要的顏色,如
.table-striped-red > tbody > tr:nth-of-type(odd) {
? background-color: red;
}
最后<tabel> 增加class→ <table calss="table table-striped-red">就好了。。但是 這個方法 hover效果好像就失效了
2016-03-03
css文件里面有個color 改變里面的例如#333 這種數值什么的