Created
March 8, 2013 06:42
-
-
Save coolicer/5114642 to your computer and use it in GitHub Desktop.
cross brower inline-block
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
.dib-wrap { | |
font-size:0;/* 所有浏览器 */ | |
*word-spacing:-1px;/* IE6、7 */ | |
} | |
.dib-wrap .dib{ | |
font-size: 12px; | |
letter-spacing: normal; | |
word-spacing: normal; | |
vertical-align:top; | |
} | |
@media screen and (-webkit-min-device-pixel-ratio:0){ | |
/* firefox 中 letter-spacing 会导致脱离普通流的元素水平位移 */ | |
.dib-wrap{ | |
letter-spacing:-5px;/* Safari 等不支持字体大小为 0 的浏览器, N 根据父级字体调节*/ | |
} | |
} | |
.dib { | |
display: inline-block; | |
*display:inline; | |
*zoom:1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment