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水平垂直居中于屏幕的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did115288
css实现DIV水平垂直居中于屏幕
代码如下:
阅读:48次