bootstrap中的清除浮动
前台用的是bootstrap做的,遇到需要清除浮动的,查过资料之后找到了个方法。
<div class="clearfix"></div>
在需要清除浮动的地方加上这个就行了!
bootstrap.css文件中.clearfix 类样式如下
// Mixin itself .clearfix() { &:before, &:after { content: " "; display: table; } &:after { clear: both; } } // Usage as a mixin .element { .clearfix(); }
更多web前端知识,请查阅 HTML中文网 !!
以上就是bootstrap怎么消除浮动?的详细内容,更多请关注0133技术站其它相关文章!