设置上下角标对齐

<style>
    sub{
        margin-left: -6px;
    }
</style>
<body>
X<sup>2</sup><sub>1</sub>
</body>
<sup>上角标<sub>下角标,下角标向左移动6个像素就可以达到角标上下对齐的效果

猜你喜欢

转载自www.cnblogs.com/Yuigahama-Yui/p/13379154.html