Home > Article > Web Front-end > After using float in CSS, if the browser interface is reduced, the box will float down. _html/css_WEB-ITnose
CSS interface HTML float positioning
Let me give a simple example:<head><style type="text/css"> /*自定义盒子的大小*/ div{ border:#999 solid 1px; height:200px; width:300px;} #div_1{background-color:#0FF; float:left; } #div_2{background-color:#F0F; float:left; } #div_3{background-color:#FF0; } </style></head><body> <div id="div_1">第一个盒子</div> <div id="div_2">第二个盒子</div> <div id="div_3">第三个盒子</div></body>
When maximizing the interface at the beginning, it looks like this: 口口口
After shrinking the browser interface, it becomes: 口
.
<body> <html style="min-width:906px;overflow-x:auto;"> <div id="div_1">第一个盒子</div> <div id="div_2">第二个盒子</div> <div id="div_3">第三个盒子</div> </html></body>Just use a table to dice the two modules. . .