前端学习记录4

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
#div1{width:300px;heigh:300px;background: red;}
#div1:hover{background: black}
#div2{width: 100px;height: 100px;background: green;}
#div1:hover>#div2{background: blue;}
</style>
</head>
<body>
<div id="div1">
<div id="div2">
<div id="div3"></div>
</div>
</div>
<span>4必须是1紧邻着的下一个弟弟</span>
<div id="div4"></div>

</body>
</html>
上一篇:头部导航栏简单制作


下一篇:[高能]给盒子添加一道白光让效果更高级