.nav{ background-color: #191b26; /* position: fixed; */ } .navbar{ position: relative; } .back-icon, .home-icon{ /* width: 170rpx; */ height: 100%; color: #fff; align-items: center; font-size: 14px; position: absolute; transform: translateY(-50%); top: 50%; display: flex; } .back-icon{ left: 16px; } .home-icon{ /* left: 44px; */ left: 16px; } .iconright{ margin-left: 6px; } .home-icon .projectname{ max-width: 180rpx; overflow: hidden; text-overflow: ellipsis; white-space:nowrap; } .back-icon image{ width: 28px; height: 28px; 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%; color: #fff; font-size: 0; }