div只显示在页面最上面居中
<div id="div_psw" style="background:#87CEFA;position:absolute;display:none;top:50%;left:50%;margin-top:-50px;margin-left:-125px;width:250px;height:130px;border-radius:5px;">
div显示在页面居中,即便页面很长,下拉后依旧居中
<div id="div_psw" style="background:#87CEFA;position:fixed;display:none;top:50%;left:50%;margin-top:-50px;margin-left:-125px;width:250px;height:130px;border-radius:5px;">
</div>
关键点:position:fixed;
th居中
<th style="text-align:center;vertical-align:middle;display:table-cell;">计划</th>
div和th居中显示
于 2020-03-28 13:51:28 首次发布