How do I remove the visibility of spaces between inline elements?

前端 未结 3 544
甜味超标
甜味超标 2020-12-20 20:07

Say I have several inline-block div tags, like this

cla

相关标签:
3条回答
  • 2020-12-20 20:17

    you can set "display: flex;" attribute to their parent wrapper:

    .flexbox {
      display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
      display: -moz-box;         /* OLD - Firefox 19- (buggy but mostly works) */
      display: -ms-flexbox;      /* TWEENER - IE 10 */
      display: -webkit-flex;     /* NEW - Chrome */
      display: flex;             /* NEW, Spec - Opera 12.1, Firefox 20+ */
    }
    
    0 讨论(0)
  • 2020-12-20 20:26

    put the following on a parent element:

    word-spacing:-4px;
    

    Or try:

    font-size:0px;
    

    It might work even better as it will not be affected by text resizing.

    0 讨论(0)
  • 2020-12-20 20:40

    it is an inline element behaviour, so try floating left. http://jsfiddle.net/aVrSx/

    0 讨论(0)
提交回复
热议问题