Last active
December 28, 2015 05:08
-
-
Save RyoSugimoto/7447078 to your computer and use it in GitHub Desktop.
インラインブロック同士の隙間を消す。
This file contains hidden or 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
.parent { | |
font-size: 0; | |
letter-spacing: -1px; | |
word-spacing: -1px; | |
/* | |
letter-spacingとword-spacingはそれぞれ | |
「-1」にすると、環境によって崩れる場合があるので、 | |
その場合は「0」にする。 | |
それでもうまく行かなければ、JavaScriptで改行を削除するか、 | |
あらかじめHTMLから改行を消しておく。 | |
*/ | |
} | |
.inline-block { | |
display: inline-block; | |
font-size: 1rem; | |
letter-spacing: normal; | |
word-spacing: normal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment