Twitter bootstrap 使用Twitter引导将样式应用于表
有人知道是否可以使用Twitter引导在表上应用样式吗?我可以在一些较旧的教程中看到一些表格示例,但在引导网站本身上看不到 我尝试过设置它,但我页面中的表格几乎没有应用任何样式Twitter bootstrap 使用Twitter引导将样式应用于表,twitter-bootstrap,Twitter Bootstrap,有人知道是否可以使用Twitter引导在表上应用样式吗?我可以在一些较旧的教程中看到一些表格示例,但在引导网站本身上看不到 我尝试过设置它,但我页面中的表格几乎没有应用任何样式 # 名字 姓 语言 1. 一些 一个 英语 2. 乔 六包 英语 我需要应用哪些类?Bootstrap提供了各种表格样式。查看文档和示例 以下样式提供了非常好看的表格: ... 您还可以应用TR类:信息、错误、警告或成功。只是另一个好看的表。我添加了“tablehover”类,因为它提供了一个很好的悬停效果
#
名字
姓
语言
1.
一些
一个
英语
2.
乔
六包
英语
我需要应用哪些类?Bootstrap提供了各种表格样式。查看文档和示例 以下样式提供了非常好看的表格:
...
您还可以应用TR类:信息、错误、警告或成功。只是另一个好看的表。我添加了“tablehover”类,因为它提供了一个很好的悬停效果
<h3>NATO Phonetic Alphabet</h3>
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<th>Letter</th>
<th>Phonetic Letter</th>
</tr>
</thead>
<tr>
<th>A</th>
<th>Alpha</th>
</tr>
<tr>
<td>B</td>
<td>Bravo</td>
</tr>
<tr>
<td>C</td>
<td>Charlie</td>
</tr>
</table>
北约语音字母表
书信
拼音字母
A.
阿尔法
B
布拉沃河
C
查理
推特引导表可以设置样式并精心设计。您只需在表上添加一些类,就可以设置表的样式,这样会很好看。您可以在数据报告、显示信息等中使用它 您可以使用:
basic table
Striped rows
Bordered table
Hover rows
Condensed table
Contextual classes
Responsive tables
条带行表:
<table class="table table-striped" width="647">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Address</th>
<th>mail</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Thomas bell</td>
<td>Brick lane, London</td>
<td>thomas@yahoo.com</td>
</tr>
<tr>
<td height="29">2</td>
<td>Yan Chapel</td>
<td>Toronto Australia</td>
<td>Yan@yahoo.com</td>
</tr>
<tr>
<td>3</td>
<td>Pit Sampras</td>
<td>Berlin, Germany</td>
<td>Pit @yahoo.com</td>
</tr>
</tbody>
</table>
#
名称
地址
邮件
1.
托马斯·贝尔
伦敦布里克巷
thomas@yahoo.com
2.
燕堂
澳大利亚多伦多
Yan@yahoo.com
3.
皮特桑普拉斯
德国柏林
Pit@yahoo.com
压缩表:
压缩需要添加class=“table table condensed”的表
<table class="table table-condensed" width="647">
<thead>
<tr>
<th>#</th>
<th>Sample Name</th>
<th>Address</th>
<th>Mail</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Thomas bell</td>
<td>Brick lane, London</td>
<td>thomas@yahoo.com</td>
</tr>
<tr>
<td height="29">2</td>
<td>Yan Chapel</td>
<td>Toronto Australia</td>
<td>Yan@yahoo.com</td>
</tr>
<tr>
<td>3</td>
<td>Pit Sampras</td>
<td>Berlin, Germany</td>
<td>Pit @yahoo.com</td>
</tr>
<tr>
<td></td>
<td colspan="3" align="center"></td>
</tr>
</tbody>
</table>
#
样本名称
地址
邮寄
1.
托马斯·贝尔
伦敦布里克巷
thomas@yahoo.com
2.
燕堂
澳大利亚多伦多
Yan@yahoo.com
3.
皮特桑普拉斯
德国柏林
Pit@yahoo.com
参考:引导为表提供了各种类
<table class="table"></table>
<table class="table table-bordered"></table>
<table class="table table-hover"></table>
<table class="table table-condensed"></table>
<table class="table table-responsive"></table>
您可以向每一行添加上下文类,如下所示:
<tr class="table-success"></tr>
<tr class="table-error"></tr>
<tr class="table-warning"></tr>
<tr class="table-info"></tr>
<tr class="table-danger"></tr>
您还可以将它们添加到与上面相同的表数据中
您可以通过将类设置为table sm等来设置表大小
您可以添加自定义类并添加自己的样式:
<table class="table">
<thead style = "color:red;background-color:blue">
<tr>
<th></th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>Asdf</td>
<td>qwerty</td>
</tr>
</tbody>
</table>
名字
姓
Asdf
qwerty
这样可以添加自定义样式。我已经展示了内联样式,例如它是如何工作的,您可以添加类并在css中调用它们