當調整窗口大小時,需要一些幫助來更改行中的列數。例如,對於大中型屏幕,應該有3列一列,對於小應該有2和用於額外的小隻有1列如何更改調整大小時行中的列數 - 引導
像這樣
對於大中型
{COL-1} {COL-2} {COL-3}
{COL-4} {COL-5} {COL-6}
對於小
{COL-1} {COL-2}
{COL-3} {COL-4}
{COL-5} {COL-6}
和超小型類似
我現在做的是做一行,並把3列在它
<div class="row">
<div class="col-lg-4 col-sm-6 col-xs-12">
Some content here for column 1
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
Some content here for column 2
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
Some content here for column 3
</div>
</div>
<div class="row">
<div class="col-lg-4 col-sm-6 col-xs-12">
Some content here for column 4
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
Some content here for column 5
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
Some content here for column 6
</div>
</div>
但是使用這一招,在小屏幕上顯示它2列一列,並且下一行僅有1列
{COL-1} {COL-2}
{COL -3}
{COL-4} {COL-5}
{COL-6}
任何人都可以請幫我解決這個問題。
感謝
感謝響應,加入我的代碼在編輯的版本 –