1
目前,我正在使用基於Bootstrap 3.3.7的基於Web的遊戲(agar.io spinoff)。我不一定要爲Bootstrap 4重新編寫代碼來使用網格,那麼我該怎麼做呢? 這是我目前有:(正如你所看到的,我在這裏運行的空間)使用Bootstrap進行菜單定位
這就是我的計劃來實現:(注意的不同部分通過側面菜單側面和垂直對齊)
What I plan to achieve 是否有人可以想出解決辦法,我在這已經工作幾個小時,我難倒。我現在的CSS(#helloDialog是菜單上的主對話框):
#helloDialog, #scorebox, #news, #about, #myviewskin {
width: 400px;
background: #fff repeat scroll left top;
/* margin: 10px auto; */
padding: 5px 15px 5px 15px;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
line-height: 1;
border-radius: 15px;
}
圖片顯示爲鏈接,不知道爲什麼... –
bootstrap 3使用網格系統,請看https://getbootstrap.com/examples/grid/。你需要在你的頁面根目錄下聲明一個容器,然後如果我理解正確,可以在列中添加其他控件。作爲獎勵,您可以使用鏈接語法來移動列,以使您的遊戲能夠響應移動設備。 – RandomUs1r