我有一個容器與絕對定位的多個按鈕。我希望這些按鈕根據瀏覽器窗口寬度調整大小。所以按鈕大小和位置應該改變。 它看起來不像一個檢查板,但有可能有孔。調整大小的元素和瀏覽器窗口大小
<div id="seats">
<div class="row">
<input type="button" class="seat"/>
<input type="button" class="seat"/>
<input type="button" class="seat"/>
<input type="button" class="seat"/>
</div>
<div class="row">
<input type="button" class="seat"/>
<input type="button" class="seat"/>
</div>
</div>
恐怕簡單的css是不夠的。座位是由服務器端代碼生成和他們每個人的絕對定位(通過內聯CSS),如此看來,某種JS代碼是必要
添加您的css爲了幫助你。或者設置一個小提琴或jsbin。 –
嘗試閱讀引導CSS。它們包含一些類,如col-xs,col-sm,col-md等。http://getbootstrap.com/ – Govan
@Igle我意識到這一點。問題是我不知道如何開始。 – drv