qianqianQ
2016-09-16 22:17
class="table table-striped"斑马线表格类里为啥要加 table 不是 直接 table-striped吗 有疑问 求解答
.table这个类是设置表格的基本信息。
就例如这段,很多是基于.table这个类进行装饰表格。
.table { width: 100%; max-width: 100%; margin-bottom: 20px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; } ...
而.table-striped这个类是基于.table这个类上进行修饰的,只是修饰的方向不同
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #f9f9f9; //只是起到添加背景的效果 }
玩转Bootstrap(基础)
314559 学习 · 2357 问题
相似问题