Putting a flexbox inside of a list item is causing the content to get pushed down by what appears to be a full line height.
I've been playing around with different CSS properties, such as giving the flexbox margin-top: 0
, its children margin-top:0
, adding flex-wrap
to the flexbox, etc. No dice!
.wrapper {
display: flex;
}
li {
background: #ccc;
}
<ul>
<li>
<div class="wrapper">
<div>hello</div>
<div>world</div>
</div>
</li>
</ul>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…