flex.html 2.61 KB
<! DOCTYPE html>
<html>
<head>
<style>
body{
background:#000;
display:flex;
justify-content:center;
align-items:center;
}
.wrap{
width:510px;
margin:60px auto 0 auto;
display:flex;
flex-wrap:wrap;
}
.box{
margin:20px;
width:130px;
height:130px;
background:url("a_src/img/touzi_bg.png");
}
.content{
width:120px;
height:120px;
padding:5px;
}
.column{
flex-basis:100%;
}
.item{
width:30px;
height:30px;
margin:5px;
display: inline-flex;
background:url("a_src/img/touzi_dian.png");
}
.dian1{
display:flex;
justify-content:center;
align-items:center;
}
.dian2{
display:flex;
justify-content: space-between;
}
.dian2 .item:nth-child(2){
align-self:flex-end;
}
.dian3{
display:flex;
justify-content: space-between;
}
.dian3 .item:nth-child(2){
align-self:center;
}
.dian3 .item:nth-child(3){
align-self:flex-end;
}
.dian4{
display:flex;
flex-wrap:wrap;
align-content:space-between;
}
.dian4 .column{
display:flex;
justify-content: space-between;
}
.dian5{
display:flex;
flex-wrap:wrap;
align-content:space-between;
}
.dian5 .column{
display:flex;
justify-content: space-between;
}
.dian5 .column:nth-child(2){
display:flex;
justify-content: center;
}
.dian6{
display:flex;
flex-wrap:wrap;
align-content:space-between;
}
.dian6 .column{
display:flex;
justify-content: space-between;
}
</style>
</head>
<body>
<div class="wrap">
	<div class="box">
	  <div class="content dian1">
		<span class="item"></span>
	  </div>
	</div>

	<div class="box">
	  <div class="content dian2">
		<span class="item"></span>
		<span class="item"></span>
	  </div>
	</div>

	<div class="box">
	  <div class="content dian3">
		<span class="item"></span>
		<span class="item"></span>
		<span class="item"></span>
	  </div>
	</div>
	
	<div class="box">
	  <div class="content dian4">
	    <div class="column">
			<span class="item"></span>
			<span class="item"></span>
		</div>
		<div class="column">
			<span class="item"></span>
			<span class="item"></span>
		</div>	
	  </div>
	</div>
	
    <div class="box">
	  <div class="content dian5">
	    <div class="column">
			<span class="item"></span>
			<span class="item"></span>
		</div>
		<div class="column">
			<span class="item"></span>		
		</div>	
		<div class="column">
			<span class="item"></span>
			<span class="item"></span>
		</div>	
	  </div>
	</div>
	
	 <div class="box">
	  <div class="content dian6">
	    <div class="column">
			<span class="item"></span>
			<span class="item"></span>
		</div>
		<div class="column">
			<span class="item"></span>	
            <span class="item"></span>			
		</div>	
		<div class="column">
			<span class="item"></span>
			<span class="item"></span>
		</div>	
	  </div>
	</div>
</div>
</body>
</html>