.nav { position: fixed; top: 0; z-index: 4; width: 100%; background-color: transparent; } .navbar{ position: relative } .back-icon, .home-icon{ width: 28px; height: 100%; position: absolute; transform: translateY(-50%); top: 50%; display: flex; } .back-icon{ left: 0px; } .home-icon{ left: 44px } .back-icon image{ width: 19rpx; height: 34rpx; margin: auto; } .home-icon image{ width: 20px; height: 20px; margin: auto; } .nav-title, .nav-icon{ position: absolute; transform: translate(-50%, -50%); left: 50%; top: 50%; font-size: 0; font-weight: bold; }