盒子内容垂直居中

盒子内容垂直居中有两种: 1.给父级加上相对定位position:relative; 给子元素添加绝对定位position:absolute; 设置top,right,bottom,left的值都是0;调整margin内边距为自适应auto; <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <s
相关文章
相关标签/搜索