整理一些Bootstrap基础的常用类名出来,以备之后使用查看
字符串 | 含义 |
---|---|
lg/md/sm/xs | 大小定义(大、中等、小、极小) |
default/primany/danger/warning/info | 事件(缺省、最重要、危险、警告、信息) |
为页面内容和栅格系统包裹一个 .container 容器,可以在此基础上添加自己的class
<div class="container">
div>
根据页面的尺寸大小调整布局,横向分割空间,总共12份,按照设计的比例书写类名
<div class="col-md-2">
<h3>左侧栏h3>
div>
<div class="col-md-8">
<h1>主页面h1>
div>
<div class="col-md-2">
<h3>右侧栏h3>
div>
<div class="form-inline">
<div class="form-group has-error">
<label>用户名label>
<input type="text" class="form-control"/>
div>
<div class="form-group">
<label>密码label>
<input type="password" class="form-control"/>
div>
div>
<div class="form-group">
<label>金额label>
<div class="input-group">
<div class="input-group-addon">¥div>
<input type="text" class="form-control"/>
div>
div>
<div class="form-group">
<input type="button" class="btn btn-default" value="缺省" />
<input type="button" class="btn btn-primary" value="重要" />
<input type="button" class="btn btn-warning" value="警告" />
div>
<div class="form-group">
<input type="button" class="btn btn-default btn-lg" value="大" />
<input type="button" class="btn btn-default" value="标准" />
<input type="button" class="btn btn-default btn-sm" value="小" />
<input type="button" class="btn btn-default btn-xs" value="极小" />
div>
<div class="form-group">
<input type="button" class="btn btn-default active" value="按下" />
<input type="button" class="btn btn-default" value="正常" />
div>
<div class="btn-toolbar">
<div class="btn-group">
<input type="button" class="btn btn-default" value="btn1" />
<input type="button" class="btn btn-default" value="btn2" />
<input type="button" class="btn btn-default" value="btn3" />
div>
<div class="btn-group btn-group-lg">
<input type="button" class="btn btn-default" value="btn1" />
<input type="button" class="btn btn-default" value="btn2" />
<input type="button" class="btn btn-default" value="btn3" />
div>
div>
<ul class="nav nav-tabs">
<li class="active"><a href="#">选项1a>li>
<li><a href="#">选项2a>li>
<li><a href="#">选项3a>li>
ul>
<ul class="nav nav-pills">
<li class="active"><a href="#">选项1a>li>
<li><a href="#">选项2a>li>
<li><a href="#">选项3a>li>
ul>
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">选项1a>li>
<li><a href="#">选项2a>li>
<li><a href="#">选项3a>li>
ul>
<ul class="nav nav-tabs nav-justified">
<li class="active"><a href="#">选项1223a>li>
<li><a href="#">选项2a>li>
<li><a href="#">选项3a>li>
ul>
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a href="#" class="navbar-brand">网站名称a>
div>
<ul class="nav navbar-nav navbar-left">
<li class="active"><a href="#">主页a>li>
<li><a href="#">页面1a>li>
ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">登录a>li>
<li><a href="#">注册a>li>
ul>
div>
div>
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title">
面板标题
div>
div>
<div class="panel-body">
面板内容。。。。。。。。。。。。。
div>
<div class="panel-footer">
<div class="small">
面板底部
div>
div>
div>
<div class="panel panel-danger">
<div class="panel-heading">
<div class="panel-title">
面板标题
div>
div>
<div class="panel-body">
面板内容。。。。。。。。。。。。。
div>
<div class="panel-footer">
<div class="small">
面板底部
div>
div>
div>
<table class="table table-striped">
<caption>namecaption>
<thead>
<tr>
<th>head1th>
<th>head2th>
tr>
thead>
<tbody>
<tr>
<td>r1c1td>
<td>r1c2td>
tr>
<tr>
<td>r2c1td>
<td>r2c2td>
tr>
<tr>
<td> td>
<td>r3c2td>
tr>
tbody>
table>
<ul class="pagination">
<li><a href="#">上一页a>li>
<li><a href="#">1a>li>
<li><a href="#">2a>li>
<li><a href="#">3a>li>
<li><a href="#">下一页a>li>
ul>
<ul class="pager">
<li><a href="#">上一页a>li>
<li><a href="#">1a>li>
<li><a href="#">2a>li>
<li><a href="#">3a>li>
<li><a href="#">下一页a>li>
ul>
<ul class="breadcrumb">
<li><a href="#">主页面a>li>
<li><a href="#">分支一a>li>
<li><a href="#">本页面a>li>
ul>
<p>
<span class="label label-default">标签1span>
<span class="label label-success">标签2span>
<span class="label label-warning">标签3span>
p>