<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
border: 2px black solid;
}
div#1 {
width: 300px;
height: 300px;
background-color: aqua;
}
div#2 {
width: 400px;
height: 400px;
background-color: brown;
}
</style>
</head>
<body>
<div id='1'></div>
<div id='2'></div>
</body>
</html>
求解
自行爬坑:
CSS里面ID的值不能是纯数字
就跟各种语言的变量的命名规则一样,这是规范