duanzh 发表于 2018-12-10 09:42:26

关于基线的疑问

<!DOCTYPE html>
<head>

<style type="text/css">
.tall-box,.short-box {
   display: inline-block;
   background:gray;
   width:20px;
}

.tall-box {height:4em}
.short-box {height:0.5em}
.bottom{ vertical-align: bottom; }
.top   { vertical-align: top; }
</style>

</head>

<body>
<span style="outline: 1px dotted red;display:inline-block">
x<span class="tall-box bottom"></span>
<span class="short-box"></span>
</div>
</body>
</html>
为什么基线下移了?
页: [1]
查看完整版本: 关于基线的疑问