<html>
<head>
<title>111</title>
<style>
#box1{
display:flex;
justify-content:center;
align-items:center;
}
#box2{
display:flex;
justify-content:space-between;
/*flex-direction: column;
align-items: center;*/
}
.item2:nth-child(2){
align-self:flex-end;
}
#box3{
display:flex;
justify-content: space-between;
}
.item3:first-child{
align-self:flex-start;
}
.item3:nth-child(2){
align-self:center;
}
.item3:nth-child(3){
align-self:flex-end;
}
#box4{
display:flex;
flex-wrap: wrap;
align-content:space-between;/*解决column不在两边*/
}
.column4 {
flex-basis: 100%;/*?????????????????????????*/
display: flex;
justify-content: space-between;
}
#box5{
display:flex;
flex-wrap: wrap;
align-content:space-between;/*解决column不在两边*/
}
.column5 {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
.column55 {
flex-basis: 100%;
display: flex;
justify-content: center;
}
#box6{
display:flex;
flex-wrap: wrap;
align-content:space-between;/*解决column不在两边*/
}
.column6 {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
#box7{
display:flex;
flex-wrap: wrap;
align-content:space-between;/*解决column不在两边*/
}
.column7 {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
.column77 {
flex-basis: 100%;
display: flex;
justify-content: center;
}
#box8{
display:flex;
flex-wrap: wrap;
align-content:space-between;/*解决column不在两边*/
}
.column8 {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
.column88 {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
.item8-center {
display: flex;
/*align-self: center;*/
justify-content:center;
}
#box9{
display:flex;
flex-wrap: wrap;
align-content:space-between;/*解决column不在两边*/
}
.column9 {
flex-basis: 100%;
display: flex;
justify-content: space-between;
}
.Grid-cell {
flex: 1;
}
.item{
width:15px;height:15px;border-radius:15px;background-color:#666;
}
.box{
width:60px;height:60px;border-radius:10px;background-color: #ddd;
margin:20px;
float:left;
border:7px solid #ccc;
padding:3px;
}
</style>
</head>
<body>
<div id="box1" class="box">
<span class="item"></span>
</div>
<div id="box2" class="box">
<span class="item2 item"></span>
<span class="item2 item"></span>
</div>
<div id="box3" class="box">
<div class="item3 item" ></div>
<div class="item3 item" ></div>
<div class="item3 item" ></div>
</div>
<div id="box4" class="box">
<div class="column4">
<div class="item4 item"></div>
<div class="item4 item"></div>
</div>
<div class="column4">
<div class="item4 item"></div>
<div class="item4 item"></div>
</div>
</div>
<div id="box5" class="box">
<div class="column5">
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column55">
<div class="item"></div>
</div>
<div class="column5">
<div class="item"></div>
<div class="item"></div>
</div>
</div>
<div id="box6" class="box">
<div class="column6">
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column6">
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column6">
<div class="item"></div>
<div class="item"></div>
</div>
</div>
<div id="box7" class="box">
<div class="column77">
<div class="item"></div>
</div>
<div class="column7">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column7">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</div>
<div id="box8" class="box">
<div class="column88 Grid">
<div class="Grid-cell item8-center">
<div class="item item8"></div>
</div>
<div class="Grid-cell item8-center">
<div class="item item8"></div>
</div>
</div>
<div class="column8">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column8">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</div>
<div id="box9" class="box">
<div class="column9">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column9">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<div class="column9">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</div>
</body>
</html>
css-尝试flex布局实例(骰子)
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...