/*水平和垂直水平居中*/ .vertical-center{ position: absolute; top:50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } .screen-center{ position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); }