1
我在製作特定寬度的網格樣式時遇到了問題。我想將寬度的大小設置爲主體寬度的一半。我已經嘗試過,但它幾乎消耗了頁面的整個寬度。我想減少它的寬度。任何人都可以告訴我,如何減少網格的寬度
這裏是我試過的代碼。如何製作特定寬度的網格樣式?
enter code here
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.floating-box {
display:inline-block;
width: 50px;
height: 75px;
margin: 10px;
border: 3px solid #8AC007;
}
</style>
</head>
<body>
<div class="floating-box">Grid Box</div>
<div class="floating-box">Grid Box</div>
<div class="floating-box">Grid Box</div>
<div class="floating-box">Grid Box</div>
<div class="floating-box">Grid box</div>
<div class="floating-box">Grid box</div>
<div class="floating-box">Grid box</div>
<div class="floating-box">Grid box</div>
</body>
</html>
https://jsfiddle.net/4gzkx53q/1/
你的問題不清楚。你想要達到什麼目的? – makshh
會不會有8格的盒子? –
我想在網格樣式中顯示div。網格應該是特定的寬度 –