这是图片:我想让两种大小不同的字体能够在中线竖直对齐。
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
.a{
width: 200px;
height: 100px;
line-height: 100px;
border: 1px solid black;
}
span{
font-size: 20px;
display: inline-block;
}
b{
font-size: 50px;
}
</style>
</head>
<body>
<div class='a'>
<span>a</span>
<b>asd</b>
</div>
</body>
</html>