div居中样式:
show_center{ margin-left: auto; margin-right: auto; width: 1000px; //宽度根据自己需要设定 height: 300px; //根据需要设定 ...}
使用样式: <div class="show_center"></div>
这里要注意一点:如果样式中加入 position:absolute; div居中的效果就没了。
本文共 258 字,大约阅读时间需要 1 分钟。
div居中样式:
show_center{ margin-left: auto; margin-right: auto; width: 1000px; //宽度根据自己需要设定 height: 300px; //根据需要设定 ...}
使用样式: <div class="show_center"></div>
这里要注意一点:如果样式中加入 position:absolute; div居中的效果就没了。
转载于:https://www.cnblogs.com/yunp07/p/3925170.html
转载地址:https://blog.csdn.net/weixin_30846599/article/details/99195587 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!