行内布局问题(一)

引出基线baseline

by jizhen tan

HTML

<div class="test">
    <img src="https://sfault-avatar.b0.upaiyun.com/344/542/3445428434-5631776c183b2_huge256" alt=""><span>Xx</span>
 </div>

CSS

.test {
  background: red;
}
img {
	width: 50px;
	height: 50px;
}
span {
	background: white;
}