如何让一个元素始终在窗口水平垂直居中

方法一:div{200px;height:200px;background:#000;position:fixed;left:0;top:0;right:0;bottom:0;margin:auto;}

方法二:div{200px;height:200px;background:#000;position:fixed;left:50%;top:50%;margin:-100px 0 0 -100px;}

原文地址:https://www.cnblogs.com/zhangshaofeng/p/9358690.html