我想在html頁面中創建一個6 * 6輸入框的正方形。爲了放置它們,我使用的div和css:div div內的正方形對齊問題
<div class="boxes">
<div class="box_0_0"><input... ></div>
<div class="box_0_1"><input... ></div>
<div class="box_0_2"><input... ></div>
<div class="box_0_3"><input... ></div>
...
<div class="box_1_0"><input... ></div>
<div class="box_1_1"><input... ></div>
...
</div>
其中
.boxes { position: relative; }
.box_0_0 { position: relative; float: left; top: 0px; left: 0px; width: 40px; height: 50px; }
.box_0_1 { position: relative; float: left; top: 0px; left: 50px; width: 40px; height: 50px; }
...
.box_1_0 { position: relative; float: left; top: 60px; left: 0px; width: 40px; height: 50px; }
.box_1_1 { position: relative; float: left; top: 60px; left: 50px; width: 40px; height: 50px; }
但結果不是正方形排列:
我怎樣才能做到這一點?
IT解決這個問題。謝謝 !!! – JVerstry