※ 引述《DJWS (...)》之銘言:
: 現在有個 <div> 做成的文字方格
: 那麼下面四種對齊的情形該怎麼用CSS實現?
: 1. 方格的位置左右置中對齊
margin: 0 auto;
: 2. 方格的位置上下置中對齊
margin: auto 0;
: 3. 方格裡面的字左右置中對齊
text-align: center;
: 4. 方格裡面的字上下置中對齊
display: table-cell;
vertical-align: middle;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.54.119