Last active
December 16, 2015 06:58
-
-
Save monjer/5394767 to your computer and use it in GitHub Desktop.
常用工具样式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********清除浮动塌陷********/ | |
/* | |
* reference: | |
* 1.http://nicolasgallagher.com/micro-clearfix-hack/ | |
* 2.http://www.qianduan.net/new-clearfix.html | |
* 3.http://stackoverflow.com/questions/8554043/what-is-clearfix | |
* | |
*/ | |
/*方法一,推荐*/ | |
.clearfix:after{content: '.';clear: both;display: block;height: 0;visibility: hidden;line-height: 0;} | |
.clearfix{*zoom: 1;}/* For IE 6/7 only Include this rule to trigger hasLayout and contain floats.*/ | |
/*方法二*/ | |
.clearhidden{overflow: hidden;*zoom: 1;} | |
/*方法三*/ | |
.clearauto{overflow: auto;*zoom: 1;} | |
/******页面元素固定********/ | |
.affix { | |
position: fixed; | |
} | |
/******左浮动********/ | |
.pull-left{ | |
float:left; | |
} | |
/******右浮动********/ | |
.pull-right{ | |
float:right; | |
} | |
/******显示********/ | |
.show { | |
display: block; | |
} | |
/******隐藏********/ | |
.hide { | |
display: none; | |
} | |
/****block元素居中****/ | |
.b-center{ | |
margin:0 auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment