用flex写筛子的各个面

用flex写小圆圈在一个方块里怎么布局。
在这里插入图片描述
主要用到flex的
justify-content: ;
flex-wrap: ;
align-items: ;
等等挺简单的一些css

<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>筛子</title>
		<style type="text/css">
			html,
			body {
				height: 100%;
				width: 100%;
			}
			
			* {
				margin: 0px;
				padding: 0px;
			}
			
			.container {
				height: 100%;
				width: 100%;
				display: flex;
				justify-content: space-around;
				flex-wrap: wrap;
			}
			
			.container .box {
				height: 200px;
				width: 200px;
				border: 5px solid black;
				/*flex-wrap: wrap;*/
				/*display: flex;*/
			}
			
			.container .box .one {
				height: 100%;
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				/*左右居中主轴*/
			}
			
			.container .cicle {
				height: 20px;
				width: 20px;
				border-radius: 10px;
				background-color: black;
			}
			
			.container .box .two {
				height: 100%;
				width: 100%;
				display: flex;
				flex-direction: column;
				/*转一下主轴*/
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .three {
				height: 100%;
				/*width: 100%;*/
				/*box-sizing: content-box;*/
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-around;
				border: none;
				padding: 0px 25px;
			}
			
			.container .box .four {
				height: 100%;
				display: flex;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .four .top1 {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .four .bottom1 {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .five {
				height: 100%;
				display: flex;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .five .top1 {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .five .bottom1 {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .five .point {
				height: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
			}
			
			.container .box .six {
				height: 100%;
				display: flex;
				justify-content: space-around;
				align-items: center;
			}
			
			.container .box .six .top2 {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
			}
			
			.container .box .six .bottom2 {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
			}
			
			.container .box .seven {
				height: 100%;
				/*display: flex;*/
			}
			
			.container .box .seven .seven1 {
				height: 50%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
				padding: 0px 20px;
			}
			
			.container .box .seven .seven2 {
				height: 50%;
				display: flex;
				/*flex-direction: column;*/
				justify-content: space-between;
				
				align-items: center;
			}
			.container .box .seven .seven2 .seven3{
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
				
			}
			.container .box .seven .seven2 .seven4{
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				align-items: center;
			}
		</style>
	</head>

	<body>
		<div class="container">
			<!--第一个-->
			<div class="box">
				<div class="one">
					<div class="cicle">

					</div>
				</div>

			</div>
			<!--第二个-->
			<div class="box">
				<div class="two">
					<div class="cicle">

					</div>
					<div class="cicle">

					</div>
				</div>
			</div>
			<!--第三个-->
			<div class="box">
				<div class="three">
					<div class="cicle" style="align-self: flex-start;">

					</div>
					<div class="cicle">

					</div>
					<div class="cicle" style="align-self: flex-end;">

					</div>
				</div>
			</div>
			<!--第四个-->
			<div class="box">
				<div class="four">
					<div class="top1">
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>
					</div>
					<div class="bottom1">
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>
					</div>
				</div>
			</div>
			<!--第五个-->
			<div class="box">
				<div class="five">

					<div class="top1">
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>
					</div>
					<div class="point">
						<div class="cicle">

						</div>
					</div>
					<div class="bottom1">
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>
					</div>

				</div>

			</div>
			<!--第六个-->
			<div class="box">
				<div class="six">
					<div class="top2">
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>

					</div>
					<div class="bottom2">
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>
						<div class="cicle">

						</div>

					</div>
				</div>
			</div>
			<!--第七个-->
			<div class="box">
				<div class="seven">
					<div class="seven1" >
						<div class="cicle" style="align-self: flex-start;">

						</div>
						<div class="cicle">

						</div>
						<div class="cicle" style="align-self: flex-end;">

						</div>
					</div>
					<div class="seven2">
						<div class="seven3" style="padding-left: 20px ;">
							<div class="cicle">

							</div>
							<div class="cicle">

							</div>
						</div>
						<div class="seven4" style="padding-right:20px ;">

							<div class="cicle">

							</div>
							<div class="cicle">

							</div>
						</div>

					</div>

				</div>
			</div>
			
			
		</div>
	</body>

</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值