Skip to content

Instantly share code, notes, and snippets.

@RyoSugimoto
Last active December 19, 2015 01:19
Show Gist options
  • Save RyoSugimoto/5874655 to your computer and use it in GitHub Desktop.
Save RyoSugimoto/5874655 to your computer and use it in GitHub Desktop.
様々なClearfix。
/* Clearfixes */
/** --
* Original
*/
.original:after{
content: ".";
display: block;
height: 0;
font-size:0;
clear: both;
visibility:hidden;
}
.original {
display: inline-block;
}
/* Hide from IE Mac \*/
* html .original { height: 1%; }
.original { display: block; }
/* End hack */
/** --
* Micro
*/
.micro:before,
.micro:after {
content: ' ';
/*display: table;*/
display: block;
}
.micro:after {
clear: both;
}
.micro {
*zoom: 1;
}
/** --
* Minimum
*/
.min:after {
clear: both;
content: '';
display: block;
}
/** --
* Overflow
*/
.oh {
overflow: hidden;
zoom: 1;
}
/** --
* Clear after (No browser supports this now (13.6.27))
*/
.clear-after {
clear-after: left;
/* or clear: left after; */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment