CCS 父级下有子级 然后下面有两个div块,为什么不是跑到父级底层下,而是跑到了子级上面

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style type="text/css">
		.TU{height: 500px;background: red;}
		.TU2{height: 200px;width:200px;background:green;);background-size:200px;}
		.TU3{height: 50px;width: 50px;background: pink;}
		.TU4{height: 50px;width: 50px;background: blue;}
	</style>
</head>
<body>
	<div class="TU">
		<div class="TU2"><div>
	</div>
	<div class="TU3"></div>
	<div class="TU4"></div>
</body>
</html>
标题

 

主要是tu2 div没闭合


	<div class="TU">
		<div class="TU2"></div><!---这里没闭合--->
	</div>

.TU2{height: 200px;width:200px;background:green;);background-size:200px;}

tu2样式多了个右括号在里面。。不过没影响,主要是标签闭合的问题。解决了你的问题可以点右上角采纳支持下哦~~

您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632