美文网首页
bootstrap完美实现5列布局

bootstrap完美实现5列布局

作者: 全栈弄潮儿 | 来源:发表于2018-08-01 10:08 被阅读563次

自定义五列的 CSS 类

这种方法相对简单的,自定义一套CSS类,尽量和Bootstrap风格保持一致。

.col-xs-5ths, .col-sm-5ths, .col-md-5ths, .col-lg-5ths {
position: relative;
min-height: 1px;
padding-right: 10px;
padding-left: 10px;
}

@media ( min-width : 768px) {
.col-sm-5ths {
width: 20%;
float: left;
}
}

@media ( min-width : 992px) {
.col-md-5ths {
width: 20%;
float: left;
}
}

@media ( min-width : 1200px) {
.col-lg-5ths {
width: 20%;
float: left;
}
}

效果图:

图片.png

更多angular1/2/4/5、ionic1/2/3、react、vue、微信小程序、nodejs等技术文章、视频教程和开源项目,请关注微信公众号——全栈弄潮儿

微信公众号.png

前端最火框架排行榜——小程序二维码

image

相关文章

网友评论

      本文标题:bootstrap完美实现5列布局

      本文链接:https://www.haomeiwen.com/subject/rsjlvftx.html