tags: Web Design
CSS
CDN 環境建置
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
補充:Bonita UI只使用了css的部分
Grid 網格
- 單位:xs, sm, md, lg
- 最多12個column
<div class="col-sm-4">.col-sm-4</div>
Text
- <small>:lighter, secondary header
- <mark>
- <kbd>:keyboard input
- text, background:bg-, text-
- color:success, danger, info, warning, active
- 其他class:center, uppercase
Table
-
striped rows:
.table-striped
-
.table-bordered
,.table-hover
-
欄位顏色:同Text
-
.table-responsive
-
形狀:
.img-rounded
,.img-circle
,.img-thumbnail
-
.img-responsive
Button
- style:同Text
- size:
.btn-lg
,.btn-md
,.btn-sm
,.btn-xs
.btn-block
:entire width of the parent element.active
,.disabled
Button Group
.btn-group-vertical
- 等分:
.btn-group-justified
- data-toggle,參考Dropdown
Badge 數字指標
<a href="#">News <span class="badge">5</span></a>
Label 文字訊息
顏色:同Text
<h1>Example <span class="label label-default">New</span></h1>
Pagination
- add the .pagination class to an <ul> element
.active
,.disabled
- size:
.pagination-lg
,.pagination-sm
- 特殊style:
.breadcrumb
,.pager
Panel
.panel-heading
,.panel-footer
.panel-group
- 顏色:同Text
Dropdown
- basic
<div class="btn-group">
<button type="button" class="btn btn-primary">Sony</button>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
- divider:
.divider
- header:
.dropdown-header
Collapse 折疊
- basic (hidden to show)
<button data-toggle="collapse" data-target="#demo">Collapsible</button>
<div id="demo" class="collapse">
Lorem ipsum dolor text....
</div>
- show to hidden:
class="collapse in"
- 應用:panel, list Group
其他常用tag
-
List Group 很像panel
-
Menu/Tab/Pill Tab屬於Navigation Bar的一部分
-
Form:All textual ,
<textarea>
, and<select>
elements with class.form-control
have a width of 100%.
a. 控制在同一水平:.form-control-static
-
Input Groups: icon or help text,例如:search bar
-
Carousel 輪播
-
Modal 互動視窗(block背景,彈出dialog)
-
Tooltip 提示框
-
Scrollspy 滾動監聽
-
Filter
Reference
- Bootstrap 3 Tutorial:https://www.w3schools.com/bootstrap/default.asp
沒有留言:
張貼留言