.container-mask{ position: fixed; top: 0; left: 0; width: 100%; height: 100%; transition: all 0.3s; } .mask-bg{ height: 100%; width: 100%; background: #ffffff; // position: absolute; z-index: 99; } .mask-content { display: inline-block; // position: absolute; z-index: 101; overflow: hidden; } .center{ display: flex; flex-direction: row; align-items: center; justify-content: center; }