摘要: 1、已知块级元素的宽和高,使用绝对定位+外边距设定水平垂直居中。 父元素position:relative,子元素position:absolute;top:50%;left:50%;margin-top:-height/2;margin-left:-width/2; 效果图如下 代码: 2、使用c 阅读全文
posted @ 2017-05-02 16:53 Youngly 阅读(32618) 评论(0) 推荐(4) 编辑