<!DOCTYPE html>
<html>
<head>
	<title>小方块</title>
	<style type="text/css">
		.container{
			display: flex;
			justify-content: center;
			align-items: center;
			height: 100vh;
		}
		.box{
			width: 20px;
			height: 20px;
			margin: 10px;
		}
		.red{
			background-color: red;
		}
		.blue{
			background-color: blue;
		}
		.yellow{
			background-color: yellow;
		}
		.green{
			background-color: green;
		}
	</style>
</head>
<body>
	<div class="container">
		<div class="box red"></div>
		<div class="box blue"></div>
		<div class="box yellow"></div>
		<div class="box green"></div>
	</div>
</body>
</html
请实现一个网页网页顶部区域居中显示四个小方块颜色分别是 RED BLUE YELLOW GREEN 方块大小为20px

原文地址: https://www.cveoy.top/t/topic/gsEp 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录