怎么用第二种方法设置div居中 我先把div的display设置为inline,然后设置text—align:center。可div没有居中
html: <div id="center2">把我变成行内元素啦</div>
css:
#center2{ background-color: palevioletred; display: inline; text-align: center; }
html: <div id="center2">把我变成行内元素啦</div>
css:
#center2{ background-color: palevioletred; display: inline; text-align: center; }
2018-04-28
举报