南通颐猩文化传播有限公司

當前位置:首頁 >  站長 >  編程技術(shù) >  正文

HTML使用柵格布局實現(xiàn)六種篩子樣式的代碼詳解

 2020-12-21 16:02  來源: 腳本之家   我來投稿 撤稿糾錯

  域名預(yù)訂/競價,好“米”不錯過

這篇文章主要介紹了HTML使用柵格布局實現(xiàn)六種篩子的樣式,本文通過實例代碼給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

先上效果圖下面附上代碼

 

<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.big {
width: 100px;
height: 100px;
background: skyblue;
display: flex;
margin-top: 20px;
}
.small {
width: 10px;
height: 10px;
background: purple;
border-radius: 5px;
}

.one {
display: flex;
justify-content: center;
/*交叉軸*/
align-items: center;
}

.two {
display: flex;
justify-content: space-around;
align-items: center;
}

.two2 {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}

.three {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}

.four {
display: flex;
justify-content: space-around;
}

.four1 {
display: flex;
justify-content: space-around;
align-items: center;
}

.four2 {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}

.five {
display: flex;
justify-content: space-around;
}

.five1 {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}

.five2 {
display: flex;
flex-direction: row;
align-self: center;
}

.six {
display: flex;
justify-content: space-around;
}

.six1 {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}
</style>
</head>

<body>
<div class="big one">
<div class="small"></div>
</div>
<div class="big two">
<div class="small"></div>
<div class="small"></div>
</div>
<div class="big two2">
<div class="small"></div>
<div class="small"></div>
</div>
<div class="big three">
<div class="small" style="align-self: flex-start;"></div>
<div class="small" style="align-self: center;"></div>
<div class="small" style="align-self: flex-end;"></div>
</div>
<div class="big three">
<div class="small" style="align-self: flex-end;"></div>
<div class="small" style="align-self: center;"></div>
<div class="small" style="align-self: flex-start;"></div>
</div>
<div class="big four">
<div class="four2">

<div class="small"></div>
<div class="small"></div>
</div>
<div class="four2">

<div class="small"></div>
<div class="small"></div>
</div>
</div>
<div class="big five">
<div class="five1">

<div class="small"></div>
<div class="small"></div>
</div>
<div class="five2">

<div class="small"></div>
</div>
<div class="five1">

<div class="small"></div>
<div class="small"></div>
</div>
</div>

<div class="big six">
<div class="six1">
<div class="small"></div>
<div class="small"></div>
<div class="small"></div>
</div>
<div class="six1">
<div class="small"></div>
<div class="small"></div>
<div class="small"></div>
</div>
</div>
<div class="big six">
<div class="six1">
<div class="small"></div>
<div class="small"></div>
</div>
<div class="six1">
<div class="small"></div>
<div class="small"></div>
</div>
<div class="six1">
<div class="small"></div>
<div class="small"></div>
</div>
</div>
</body>

</html>

總結(jié)

到此這篇關(guān)于HTML使用柵格布局實現(xiàn)六種篩子的樣式的代碼詳解的文章就介紹到這了,更多相關(guān)html 柵格布局 內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!

來源:腳本之家

鏈接:https://www.jb51.net/web/728714.html

申請創(chuàng)業(yè)報道,分享創(chuàng)業(yè)好點子。點擊此處,共同探討創(chuàng)業(yè)新機遇!

相關(guān)標簽
html
代碼設(shè)計

相關(guān)文章

  • 一場深度的IT效率革命:低代碼市場加速嬗變

    盡管IT技術(shù)支撐了全球的信息化浪潮,然而困擾行業(yè)已久的軟件開發(fā)效率卻難以像摩爾定律一樣快速提升,甚至已經(jīng)成為了一種瓶頸,在困擾著行業(yè)的繼續(xù)發(fā)展。一邊是碼農(nóng)們高喊著996的境況,另一邊是程序員的生產(chǎn)力并沒有用在更具價值的生產(chǎn)活動之中,重復(fù)造輪子的情況依然大量存在。近幾年,低代碼領(lǐng)域發(fā)展迅速,賽道相繼跑

    標簽:
    代碼設(shè)計
  • 網(wǎng)站頁面一定需要HTML靜態(tài)化嗎 實戰(zhàn)說明靜態(tài)化的必要性

    很多剛開始運營網(wǎng)站的伙伴們都要知道網(wǎng)站內(nèi)的頁面需要進行URL優(yōu)化嗎?如設(shè)置靜態(tài)化等,對此,本文就為大家解析一下網(wǎng)站靜態(tài)化的必要性,有興趣的朋友們可以了解下哦

    標簽:
    html
  • 在html頁面中取得session中的值的方法

    這篇文章主要介紹了在html頁面中取得session中的值的方法,本文通過實例代碼給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

    標簽:
    html
  • 如何通過HTML代碼提高SEO的效果

    我們的網(wǎng)頁是由HTML(超文本標記語言)元素組成的。甚至對于ASP、PHP和其他動態(tài)頁面,服務(wù)器也會將ASP或PHP語句呈現(xiàn)為相應(yīng)的HTML元素并發(fā)送給客戶端;對于JavaScript和其他動態(tài)頁面,客戶端會將它們轉(zhuǎn)換為HTML。

    標簽:
    seo優(yōu)化
    html
  • 解決vscode 中保存后html自動格式化的問題

    這篇文章主要介紹了vscode中保存后html自動格式化的問題,本文通過實例代碼給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

熱門排行

信息推薦