189 8069 5689

bootstrap中怎么实现五列布局-创新互联

bootstrap中怎么实现五列布局,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

成都创新互联-专业网站定制、快速模板网站建设、高性价比阿坝州网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式阿坝州网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖阿坝州地区。费用合理售后完善,10年实体公司更值得信赖。

我们知道,在使用Bootstrap栅格的时候,我们可以对网页方便的进行模块分割。Bootstrap 包含了一个响应式的、移动设备优先的、不固定的网格系统,可以随着设备或视口大小的增加而适当地扩展到12列。

它包含了用于简单的布局选项的预定义类,也包含了用于生成更多语义布局的功能强大的混合类。如果要2等分,使用col-md-6即可;要3等分,使用col-md-4即可;但如果我们要5等分或者8等分怎么办呢?下面的示例是bootstrap五等分布局:

                                                     Document                             .col-xs-1-5,            .col-sm-1-5,            .col-md-1-5,            .col-lg-1-5 {                position: relative;                min-height: 1px;                padding-right: 10px;                padding-left: 10px;            }                        .col-xs-1-5 {                width: 20%;                float: left;            }                        @media (min-width: 768px) {                .col-sm-1-5 {                    width: 20%;                    float: left;                }            }                        @media (min-width: 992px) {                .col-md-1-5 {                    width: 20%;                    float: left;                }            }                        @media (min-width: 1200px) {                .col-lg-1-5 {                    width: 20%;                    float: left;                }            }                                                      
                                姓名:王婷
                            
                             
                                性别:
                            
                             
                                部门:宣传部
                            
                                                                
                                                                                 
                                姓名:王婷
                            
                             
                                性别:
                                                         
                                部门:宣传部
                                                                                            
                                                                                 
                                姓名:王婷
                            
                             
                                性别:
                                                         
                                部门:宣传部
                                                                                            
                                                                                 
                                姓名:王婷
                            
                             
                                性别:
                                                         
                                部门:宣传部
                                                                                             
                                                                                 
                                姓名:王婷
                            
                             
                                性别:
                                                         
                                部门:宣传部
                                                                                                             

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注创新互联行业资讯频道,感谢您对创新互联网站建设公司,的支持。


网站名称:bootstrap中怎么实现五列布局-创新互联
URL标题:http://cdxtjz.cn/article/pidoe.html

其他资讯