好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

css实现DIV水平垂直居中于屏幕

代码如下:

   
  
  

 css 实现DIV水平垂直居中于屏幕 
  
body{ 
  margin:0px; 
  padding:0px; 
} 
#thediv{
  width:100px;
  height:100px;
  background:green;
  position:absolute;
  left:50%;
  top:50%;
  margin-left:-50px;
  margin-top:-50px;
}
  
  
  

查看更多关于css实现DIV水平垂直居中于屏幕的详细内容...

  阅读:43次