水平垂直居中 多行垂直居中 :display:table,不管文字是一行或者是多行,都可以垂直居中 水平垂直居中几种方式: 绝对定位+负margin 绝对定位,left:0,right:0,top:0,bottom:0,然后margin:auto; display:flex,justify-content:center,aligin-items:center;