.map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .imgBox{ position: absolute; left: 0; top: 0; z-index: 999999; width: 100vw; height: 100%; .box_bg{ background-color: rgba(0,0,0,0.5); width: 100%; height: 100%; } img{ height: 60vh; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); } }