Skip to content

Instantly share code, notes, and snippets.

@RyoSugimoto
Last active December 28, 2015 05:08
Show Gist options
  • Save RyoSugimoto/7447078 to your computer and use it in GitHub Desktop.
Save RyoSugimoto/7447078 to your computer and use it in GitHub Desktop.
インラインブロック同士の隙間を消す。
.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