好得很程序员自学网

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

css实现的div垂直居中效果代码实例_html/css_WEB-ITnose

css实现的div垂直居中效果代码实例:
关于div垂直居中效果,在网上已经有很多介绍了。
本章节再来通过代码实例演示一下如何实现此效果,希望能够给需要的朋友带来帮助。
代码实例如下:

      蚂蚁部落  #box{  width:400px;  height:200px;  background:#CCC;  position:relative;}#inner{  width:50px;  height:50px;  background:green;  position:absolute;  left:50%;  top:50%;  margin-left:-25px;  margin-top:-25px;}   

查看更多关于css实现的div垂直居中效果代码实例_html/css_WEB-ITnose的详细内容...

  阅读:30次