position: absolute; top: 38%; left: 50%; transform: translate(-50%,-10%);
主要是这句可以根据内容长短进行居中: transform: translate(-50%,-10%)
调整以上参数即可实现居中,或定位