..."."/> ...".">
Home >Web Front-end >Bootstrap Tutorial >bootstrap clear float
Bootstrap method to clear floats: first open the corresponding code file; then clear the floats by adding the ".clearfix" class to the parent element, with statements such as "f763eb893dac385cb7a7b1e7550aa39e.. .16b28748ea4df4d9c2150843fecfba68”.
The operating environment of this tutorial: Windows 7 system, bootsrap version 3.3.7, Dell G3 computer.
Floats can be easily cleared by adding the .clearfix class to the parent element. What is used here is the micro clearfix method created by Nicolas Gallagher. This class can also be used as a mixin.
The usage method is as follows:
<!-- Usage as a class --> <div class="clearfix">...</div>
.clearfix class is as follows:
// Mixin itself .clearfix() { &:before, &:after { content: " "; display: table; } &:after { clear: both; } } // Usage as a mixin .element { .clearfix(); }
Recommended: "bootstrap video tutorial" "css video tutorial》
The above is the detailed content of bootstrap clear float. For more information, please follow other related articles on the PHP Chinese website!