<h1>题目5</h1> <p>实现一个浮动布局,红色容器中每一行的蓝色容器数量随着浏览器宽度的变化而变化 </p> <div class="div-container5"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div>9</div> </div> ////////////////////////////////////////////// * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; } h1,h2,h3{ margin:5px; } .div-container5{ background-color: red; margin: 20px 50px; } .div-container5 div{ background-color: yellow; width: 300px; min-height: 50px; display: inline-block; }
BCS
miszhou