不定広い水平高垂直センタリング要素

    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%); 

おすすめ

転載: www.cnblogs.com/wwj007/p/11712956.html