bootstrap基礎(chǔ)
bootstra里面的布局模式
固定布局 container
流動(dòng)布局 container-fluid
<div class="container-fluid" style=" border: 1px solid black;height: 100px">
網(wǎng)格系統(tǒng)類似于table tr td
網(wǎng)格系統(tǒng)一行最大12列
row行
col--列
代表屏幕分辨率
sm 小 540px
md 中 720px
lg 大
xl
col-xl-auto根據(jù)內(nèi)容自動(dòng)分配
col--num 列 后面的代表跨幾列
offset-1 設(shè)置marginleft值 8.333%
offset--2 不同的屏幕marginleft
invisible隱藏元素
visible顯示元素
p-0 padding:0
p-1 padding:0.25rem;
p-2
pt
py
w-100 100%
w-75 75%
h-100 100%
h-50 50%
align-items-center 相對(duì)父容器垂直居中p-0
align-items-start 相對(duì)父容器頂部對(duì)齊
align-items-end 相對(duì)父容器底部對(duì)齊
創(chuàng)新互聯(lián)建站是一家集網(wǎng)站建設(shè),滄縣企業(yè)網(wǎng)站建設(shè),滄縣品牌網(wǎng)站建設(shè),網(wǎng)站定制,滄縣網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,滄縣網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
align-content-center 考慮多行
align-self-center 自身在flexbox中的y軸分布
justify-content-center 子元素在父容器里面的x軸的排布情況
12個(gè)均分,大小一樣
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">1</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">2</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">3</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">4</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">5</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">6</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">7</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">8</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">9</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">10</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">11</div>
<div class="col-sm-1 col-lg-1 col-md-1 col-xl-1">12</div>
1 2 3 3:2:7
<div class="col-sm-2 col-lg-1 col-md-4 col-xl-3">1</div>
<div class="col-sm-8 col-lg-6 col-md-4 col-xl-2">2</div>
<div class="col-sm-2 col-lg-5 col-md-4 col-xl-7">3</div>
5個(gè)均分,大小一樣
<div class="col">1</div>
<div class="col">2</div>
<div class="col">3</div>
<div class="col">4</div>
<div class="col">5</div>
pt-1 <div class="pt-1 col">1</div>
<div class="col">2</div>
<div class="col">3</div>
py-1 <div class="py-1 col">1</div>
<div class="col">2</div>
<div class="col">3</div>
w-100 <div class="w-100 col">1</div>
<div class="col">2</div>
<div class="col">3</div>
h-100 <div class="h-100 col">1</div>
<div class="col">2</div>
<div class="col">3</div>
1 2 3 連起來居中豎直
<div class="row align-content-center" style="border: 1px solid red; height: 300px">
<div class="col-lg-1 " style="height: 60px; border: 1px solid black">1</div>
<div class="w-100"></div>
<div class="col-lg-1" style="height: 60px; border: 1px solid black">2</div>
<div class="w-100"></div>
<div class="col-lg-1" style="height: 60px; border: 1px solid black">3</div>
</div>
1居中 2 3
<div class="row" style="border: 1px solid red; height: 300px">
<div class="col-lg-1 align-self-center" style="height: 60px; border: 1px solid black">1</div>
<div class="col-lg-1 align-self-end" style="height: 60px; border: 1px solid black">2</div>
<div class="col-lg-1" style="height: 60px; border: 1px solid black">3</div>
</div>
123接起來居中 水平
<div class="row justify-content-center" style="border: 1px solid red; height: 300px">
<div class="col-lg-1" style="height: 60px; border: 1px solid black">1</div>
<div class="col-lg-1" style="height: 60px; border: 1px solid black">2</div>
<div class="col-lg-1" style="height: 60px; border: 1px solid black">3</div>
</div>
媒體查詢
@media (min-width: 576px) {
.block{
width: 560px;
}
}
@media (min-width: 768px) {
.block{
width: 750px;
}
}
@media (min-width: 992px) {
.block{
width: 980px;
}
}
@media (min-width: 1200px) {
.block{
width: 1140px;
}
}
min-width要從小到大
@media (max-width: 1200px) {
.block{
width: 1140px;
}
}
@media (max-width: 992px) {
.block{
width: 980px;
}
}
@media (max-width: 768px) {
.block{
width: 750px;
}
}
@media (max-width: 576px) {
.block{
width: 560px;
}
}
max-width要從大到小
@media (max-width: 1200px) and (min-width: 993px) {
.block{
width: 1140px;
}
}
@media (max-width: 992px) and (min-width: 769px) {
.block{
width: 980px;
}
}
@media (max-width: 768px) and (min-width: 577px) {
.block{
width: 750px;
}
}
@media (max-width: 576px) {
.block{
width: 560px;
}
}
元素浮動(dòng)根據(jù)分辨率去選擇
float-left左浮動(dòng)
float-right右浮動(dòng)
text-center 水平居中 left right justify sm xl md lg
<div class="row text-warning">
bootstrap
</div>
<div>
<span class="h2">bootstrap</span> 大小不同
<span class="h3">bootstrap</span>
<span class="h4">bootstrap</span>
<span class="h5">bootstrap</span>
<span class="small">bootstrap</span> small是正常大小的80%
<span class="close">×</span> 關(guān)閉特效 鼠標(biāo)有點(diǎn)擊效果 已經(jīng)做好的
</div>
<ul class="list-inline">
<li>bootstrap</li>
<li>bootstrap</li> 豎著排列
<li>bootstrap</li>
<li>bootstrap</li>
<li>bootstrap</li>
</ul>
<ul>
<li class="list-inline-item">bootstrap</li>
<li class="list-inline-item">bootstrap</li> 橫著排列
<li class="list-inline-item">bootstrap</li>
<li class="list-inline-item">bootstrap</li>
<li class="list-inline-item">bootstrap</li>
</ul>
圖片響應(yīng)式 img-fluid max-width:100% img-thumbnail 圖片外邊框加圓角
<div class="col-lg-1 float-left"><img class="img-fluid rounded " src="./img/1.jpg" alt=""/></div>
<div class="col-lg-1 float-right"><img class="img-fluid rounded " src="./img/1.jpg" alt=""/></div>
rounded
一些顏色屬性
table-primary table-danger table-success table-dark table-lighttable-info table-secondary
<table class="table table-hover table-bordered table-striped">
<tr class="table-active ">
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>
響應(yīng)式圖片比父容器大
code顏色字體
kbd黑底白色
samp加粗的樣子
img-thumbnail圓角
mx-aoto左右
組件alert alert-success alert-dismissible
<button>
提示框動(dòng)畫
膠囊形狀
進(jìn)度條
網(wǎng)站欄目:bootstrap基礎(chǔ)
標(biāo)題網(wǎng)址:http://aaarwkj.com/article48/pjcoep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供用戶體驗(yàn)、品牌網(wǎng)站制作、網(wǎng)站排名、品牌網(wǎng)站設(shè)計(jì)、定制開發(fā)、企業(yè)網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)