<!DOCTYPE html>
<html>
<head>
	<title>四个小方块</title>
	<style type="text/css">
		.container {
			display: flex;
			justify-content: center;
			align-items: center;
			height: 100vh;
		}
<pre><code>	.box {
		width: 10px;
		height: 10px;
		margin: 10px;
	}

	.red {
		background-color: red;
	}

	.blue {
		background-color: blue;
	}

	.yellow {
		background-color: yellow;
	}

	.green {
		background-color: green;
	}
&lt;/style&gt;
</code></pre>
</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> 
<?php
//以上是网页的HTML代码,下面是PHP代码
?
请使用php语言实现一个网页网页上部居中显示四个小方块颜色分别是 RED BLUE YELLOW GREEN 方块大小为10px

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

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