Bootstrap纵向对齐
Bootstrap可以轻松地更改内联(inline)、内联块(inline-block)、内联表格(Bootstrap可以轻松地更改内联(inline)、内联块(inline-block)、内联表格(inline-table)以及表格单元(table cell)元素的垂直对齐方式。
使用 纵向对齐(vertical-alignment) 工具类可以改变页面元素的纵向对齐方式。请注意,纵向对齐只对内联(inline)、内联块(inline-block)、内联表格(inline-table)以及表格单元(table cell)元素有影响。
根据需要选用 .align-baseline、.align-top、.align-middle、.align-bottom、.align-text-bottom 和 .align-text-top 即可。
一、内联元素
内联(inline)元素示例:

<span class="align-baseline">baseline</span> <span class="align-top">top</span> <span class="align-middle">middle</span> <span class="align-bottom">bottom</span> <span class="align-text-top">text-top</span> <span class="align-text-bottom">text-bottom</span>
二、表格单元
表格单元示例:

<table style="height: 100px;"> <tbody> <tr> <td class="align-baseline">baseline</td> <td class="align-top">top</td> <td class="align-middle">middle</td> <td class="align-bottom">bottom</td> <td class="align-text-top">text-top</td> <td class="align-text-bottom">text-bottom</td> </tr> </tbody> </table>
广告合作
QQ群号:4114653
温馨提示:
- 本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。邮箱:2942802716#qq.com(#改为@)。
- 本站原创内容未经允许不得转裁,转载请注明出处“站长百科”和原文地址。