Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在“div”元素内有一个 css“float”设置为“left”的图像。即使位置是相对的,图像也不会强制 div 的高度增加,因此图像会突出到 div 的底部。我怎样才能解决这个问题?
将div的溢出属性设置为hidden或auto。
见http://www.quirksmode.org/css/clearing.html