1、
div{
width:200px;
height:200px;
background:#f00;
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
}
2、
div{
width:200px;
height:200px;
background:#f00;
position:absolute;
left:50%;
top:50%;
margin:-100px 0 0 -100px;
}