使用绝对定位,先设置DIV的定位上和左分别为50%,然后使用负边界,边界大小是DIV的高度和宽度的一半答案补充代 码如下:width:1003px;height:600px; background- color:#000000; position:absolute; left:50%; top:50%; margin-left:-501.5px; margin-top:-300px
posted on 2016-06-11 14:33 nickTimer 阅读(150) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3