
本文共 2185 字,大约阅读时间需要 7 分钟。
������������������������������������������������������������������������������������������������������������������������������������������������������������������Flex���������������������������������������������������������������������������������������������������������������������������������������������������������������������������display: table
���display: table-cell
���������
������������������������������������������������������HTML���������������������������������������������������������display: table
���������HTML���<table>
���������display: table-cell
���������<td>
���<th>
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
���������������������������������������������������
hello worldhello worldhello worldhello world
CSS���������������
body { background: #ccc;}div { display: table; text-align: center; margin: 100px auto; background: #fff;}p { display: table-cell; vertical-align: middle; width: 500px; height: 200px;}
������������������������������������ ���������������������������������������������������������������������������������HTML������������������������������������������CSS���������������
���������������������������������������Flexbox���Grid���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
������������������display: table-cell
���������������������vertical-align
���������inherit
������������������������������������������������������������������������������������������������������������������������������vertical-align: middle
���
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
