float属性对"子div撑开高度为0的父div"的影响

        <div style="width: 400px;background: gray;" id="">
			<div style="width: 100px;height: 100px;background: black;" id="">
				
			</div>
		</div>

		<div style="width: 400px;background: gray;" id="">
			<div style="float:left;width: 100px;height: 100px;background: black;" id="">
				
			</div>
		</div>

		<div style="float:left;width: 400px;background: gray;" id="">
			<div style="float:left;width: 100px;height: 100px;background: black;" id="">
				
			</div>
		</div>

猜你喜欢

转载自blog.csdn.net/qq_38006520/article/details/81393273
今日推荐