<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>demo1</title>
</head>
<style type="text/css">
#first {
width: 300px;
height: 300px;
background-color: blue;
color: red;
}
#second {
width: 300px;
height: 300px;
background-color: red;
color: blue;
}
</style>
<body>
<div id="first">红色背景</div>
<div id="second">蓝色背景</div>
</body>
</html>
第一个div红色背景蓝色字,第二个div蓝色背景红色字
最新推荐文章于 2024-07-08 17:28:27 发布