.nav{ position: fixed; top:0; left:0; right:0; z-index: 100; } .navbar{ position: relative } .back-icon, .home-icon{ width: 28px; height: 100%; position: absolute; transform: translateY(-50%); top: 50%; display: flex; } .back-icon{ left: 6px; padding: 0 10rpx; } .home-icon{ left: 44px } .back-icon image{ width: 20px; height: 20px; 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; }