请使用php语言实现一个网页网页上部居中显示四个小方块颜色分别是 RED BLUE YELLOW GREEN 方块大小为10px
<!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;
}
</style>
</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代码
?
原文地址: https://www.cveoy.top/t/topic/gsBO 著作权归作者所有。请勿转载和采集!