Bootstrap的表格和Html表格大同小异,只是封装了一些css供我们使用

<table>标签必须引用class="table"基类样式,我们可以根据需求赛选需要的样式其中主要的几个样式

(1) table-hover 鼠标悬停在当前行时有特效

(2) table-striped 表格呈现斑马线效果

(3) table-bordered 表格显示边框

(4) table-condensed 紧凑型表格

<!DOCTYPE html>
<html>
<head>
<title> </title>
<script src="~/Scripts/jquery-2.1.4.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<style>
.table {
margin-bottom: 30px;
} p {
color: blue;
}
</style>
</head> <body>
<div class="container">
<p>普通表格</p>
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>
标题1
</th>
<th>
标题2
</th>
<th>
标题3
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
内容1
</td>
<td>
内容2
</td>
<td>
内容3
</td>
</tr>
<tr>
<td>
内容1
</td>
<td>
内容2
</td>
<td>
内容3
</td>
</tr>
<tr>
<td>
内容1
</td>
<td>
内容2
</td>
<td>
内容3
</td>
</tr>
<tr>
<td>
内容1
</td>
<td>
内容2
</td>
<td>
内容3
</td>
</tr>
</tbody> </table> </body>
</html>

如果将 <div class="container">更改为<div class="table-responsive">当表格内容过多时会出现下拉滚动条

会呈现以下效果

Bootstrap学习------Tabel的更多相关文章

  1. Bootstrap~学习笔记索引

    回到占占推荐博客索引 bootstrap已经用了有段时间了,感觉在使用上还是比较容易接受的,在开发人员用起来上,也还好,不用考虑它的兼容性,手机,平台,PC都可以有效的兼容. bootstrap官方a ...

  2. Bootstrap学习(3)

    Bootstrap 图片  Bootstrap 对图片的支持.Bootstrap 提供了三个可对图片应用简单样式的 class: .img-rounded:添加 border-radius:6px 来 ...

  3. BootStrap学习(2)

    使用Bootstrap添加代码框 可先看:简介.引入.包下载等:http://www.cnblogs.com/0201zcr/p/4900062.html Bootstrap 允许您以两种方式显示代码 ...

  4. Bootstrap 学习(1)

    简介 Bootstrap,来自 Twitter,是目前最受欢迎的前端框架.Bootstrap 是基于 HTML.CSS.JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加快捷. Bootst ...

  5. 前端框架——BootStrap学习

    BootStrap简单总结下:1.栅格系统,能够很好的同时适应手机端和PC端(及传说中的响应式布局) 2.兼容性好 接下来是对BootStrap学习的一些基础案例总结和回顾: 首先引入:bootstr ...

  6. bootstrap学习总结-css样式设计(一)

    由于项目需要,所以打算好好学习下bootstrap框架,之前了解一点,框架总体不难,但涉及到的东西还是很多,想要熟练掌握它,还是要多练练. 一:bootstrap是什么? bs是什么?  即前端页面搭 ...

  7. Bootstrap学习笔记(二) 表单

    在Bootstrap学习笔记(一) 排版的基础上继续学习Bootstrap的表单,编辑器及head内代码不变. 3-1 基础表单 单中常见的元素主要包括:文本输入框.下拉选择框.单选按钮.复选按钮.文 ...

  8. BootStrap学习之先导篇——响应式网页

    Bootstrap学习之前,要知道响应式网页的原理. 1.什么是响应式网页? 一个页面,可以根据浏览设备的不同,以及特性的不同,而自动改变布局.大小等.使得在不同的设备上上都可以呈现优秀的界面. 优点 ...

  9. bootstrap学习笔记之为导航条添加标题、二级菜单及状态 http://www.imooc.com/code/3120

    为导航条添加标题.二级菜单及状态 加入导航条标题 在Web页面制作中,常常在菜单前面都会有一个标题(文字字号比其它文字稍大一些),其实在Bootstrap框架也为大家做了这方面考虑,其通过" ...

随机推荐

  1. 【POJ 1112】Team Them Up!(二分图染色+DP)

    Description Your task is to divide a number of persons into two teams, in such a way, that: everyone ...

  2. Linux下eclipse提示快捷键失效解决办法

    在window->Preferences->general->keys中, 找到 content asist 修改下边值 Binding 改成 Alt+/ When 改为 Editi ...

  3. BZOJ 1029 建筑抢修 贪心+堆

    又搞了一晚上OI,编了两道BZOJ和几道NOI题库,临走之前写两篇感想 noip越来越近了,韩大和clove爷已经开始停课虐我们了... 1029: [JSOI2007]建筑抢修 Time Limit ...

  4. Jenkins与Hudson的关系

    Jenkins的前身是Hudson(Sun开发),2010年从Hudson分支出来. 由于Sun被Oracle收购,Oracle拥有Hudson的商标所有权.分支出来的Jenkins将继续走open ...

  5. 一款可以下拉搜索html下拉框控件

    直接上图,组件不错,支持静态和动态搜索,这个只是在原控件上自己修改样式后的,这里主要记录一下,在修改别人控件时,应该如何去封装代码: 原控件:http://ivaynberg.github.com/s ...

  6. Lamp源码搭建

    Lamp Centos6.5 + Apache/2.2.29 + PHP 5.3.29 + Mysql5.6.20 Apache(/usr/local/apache) PHP(/usr/local/b ...

  7. CSS基础知识真难啊-background-渐变

    文章参考 http://www.zhangxinxu.com/wordpress/?p=727 http://www.uqu8.com/html/2014/html-css_1105/176.html ...

  8. C++ essentials 之 static 关键字

    extraction from The C++ Programming Language, 4th. edition, Bjarne Stroustrup If no initializer is s ...

  9. AngularJs angular.injector、angular.module

    angular.injector 创建一个injector对象, 调用injector对象的方法可用于获取服务以及依赖注入. 格式:angular.injector(modules); modules ...

  10. AngularJs angular.bind、angular.bootstrap、angular.copy

    angular.bind 返回一个调用self的函数fn(self代表fn里的this).可以给fn提供参数args(*).这个功能也被称为局部操作,以区别功能. 格式:angular.bind(se ...