为了账号安全,请及时绑定邮箱和手机立即绑定

Bootstrap表格样式

class="table table-striped"斑马线表格类里为啥要加 table 不是 直接 table-striped吗 有疑问 求解答

正在回答

1 回答

.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;  //只是起到添加背景的效果
}


0 回复 有任何疑惑可以回复我~
#1

qianqianQ 提问者

非常感谢!
2016-09-16 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
玩转Bootstrap(基础)
  • 参与学习       314557    人
  • 解答问题       2364    个

告诉你使用Bootstrap,并且能够独立定制出适合自己的Bootstrap

进入课程

Bootstrap表格样式

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号