Bootstrap 3, 11 evenly spaced columns?

南楼画角 提交于 2020-01-04 08:12:34

问题


I'm new to bootstrap 3, and I'm trying to grasp the concept of the grid system. This has been fine so far as the controls I'm working are all designed in columns that factors of 12.

However, there's one particular control that has 11 columns, and they're evenly spaced.

How can I achieve this whilst still complying with the bootstrap grid system to keep it all responsive?


回答1:


This would get you fairly close..

<div class="col-sm-11">
    <div class="col-sm-1 col-sm-offset-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
    <div class="col-sm-1">1</div>
</div>

Demo: http://bootply.com/91138

However, this won't take up the full width of the page.. That would require customization.




回答2:


customize bootstrap find the option @gridcolumns enter the required number of columns and u can generate your customized css



来源:https://stackoverflow.com/questions/19702545/bootstrap-3-11-evenly-spaced-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!