<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>测试box-sizing</title> <style> html, body, div { margin: 0; padding: 0; } #main { width: 100%; overflow: hidden; } #left { float: left; width: 10%; margin-bottom: -1000px; padding-bottom: 1000px; background: red; } #right { float: left; margin-bottom: -1000px; padding-bottom: 1000px; background: yellow; } </style> </head> <body> <div id="main"> <div id="left"> dddddddddddddddddds</br> ssssssssssssss</br> ssssssssssssssss </div> <div id="right">ddddddddddsssssssssssssddddddddddsssssssssssssddddddddddsssssssssssssddddddddddsssssssssssss</div> </div> </body> </html>
时间: 2024-10-29 13:59:01