Created
March 14, 2012 04:01
-
-
Save beiyuu/2033965 to your computer and use it in GitHub Desktop.
CSS:Tricks
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
/************** inline-block ********************/ | |
li { | |
width: 200px; | |
min-height: 250px; | |
border: 1px solid #000; | |
display: -moz-inline-stack; | |
display: inline-block; | |
vertical-align: top; | |
margin: 5px; | |
zoom: 1; | |
*display: inline; | |
_height: 250px; | |
} | |
/************** clearfix ********************/ | |
.clearfix:after { | |
content: "."; | |
display: block; | |
height: 0; | |
clear: both; | |
visibility: hidden | |
} | |
.clearfix { | |
zoom: 1; | |
display: | |
inline-block; | |
_height: 1px | |
} | |
*html .clearfix { | |
height: 1%; | |
} | |
.clearfix { | |
display: block; | |
} | |
/************** triangle ********************/ | |
/*css实现三角形的原理是:当元素的宽高为0,边框(border)不为0时,四个角边框交界重叠处分45度角平分。*/ | |
.triangle { | |
border-color: red green blue pink; | |
border-style: solid; | |
border-width: 20px 20px 20px 20px; | |
width: 0; | |
height: 0; | |
} | |
/**** IE6 BUG FIX *****/ | |
.ie6fix{ | |
border-color: transparent #fc0 transparent transparent; | |
border-style: solid; | |
border-width: 16px 16px 16px 0px; | |
padding:0; | |
width:0; | |
height:0; | |
/*ie6 height fix*/ | |
font-size:0; | |
line-height:0; | |
/*ie6 transparent fix*/ | |
_border-top-color: #ffff00; | |
_border-bottom-color: #ffff00; | |
_filter: chroma( color=#ffff00); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment