未知的偏移量。 (inline-flex element + clearfix)

时间:2016-08-10 11:55:28

标签: css flexbox inline pseudo-element clearfix

未知偏移量。在最新的Chrome,FF,IE

请解释一下,顶部偏移(1em)是什么?

enter image description here

JSFiddle



#a {
  border:1px solid blue;
}


#b {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: -ms-inline-flexbox;
  display: inline-flex; /* inline-table too */
  border:1px solid red;
  width:50px;
  height:50px;
}


#b:after { /* bootstrap clearfix */
  display:table;
  content:'';
}

<div id="a"><div id="b"></div></div>
&#13;
&#13;
&#13;

类似的问题:Why inline-flex element with clearfix has a weird white space?

0 个答案:

没有答案