1.页面显示4个颜色块
<style>
.box{
width: 200px;
height: 200px;
float: left;
border: 1px solid black;
margin: 10px;
}
</style>
<body id="all">
<div class="box" style="background-color: yellow;"></div>
<div class="box" style="background-color: red;"></div>
<div class="box" style="background-color: blue;"></div>
<div class="box" style="background-color: green;"></div>
<script>
let arr = ['yellow','red','blue','green']
let box_color = document.querySelectorAll('.box')
let body_bgcolor = document.getElementById('all')
for (let i = 0; i < arr.length; i++) {