其他分享
首页 > 其他分享> > 前端学习记录4

前端学习记录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>

标签:hover,记录,前端,100px,300px,学习,width,background,div1
来源: https://www.cnblogs.com/huzhibolibrary/p/15646875.html