.listNavWrapper { position: relative; } .listNavContainer { display: flex; align-items: center; .listNavLine { width: 1px; height: 25px; background-color: #0000000f; } .listNavLogo { width: 60px; height: 34px; } .listNavChange { width: 12px; height: 12px; } .listNavContentWrapper { padding-left: 17px; display: flex; align-items: center; gap: 8px; } .listNavCityWrapper { line-height: 20px; } .listNavCity { font-weight: 600; font-size: 13px; line-height: 20px; } .infoWrapper { line-height: 12px; } .listNavInfoWrapper { font-weight: 400; font-size: 10px; line-height: 12px; color: #3c3c4399; } } .inputCustomerNavbarContainer { padding-left: 17px; display: flex; align-items: center; gap: 8px; .logo { width: 28px; height: 16px; } .icon16 { width: 16px; height: 16px; } .navContent { display: flex; align-items: center; gap: 4px; width: 65%; height: max-content; // padding-top: 5px; } .searchContainer { width: 100%; display: flex; align-items: center; gap: 5.85px; padding: 7.8px; height: 30px; box-sizing: border-box; background: #fff; border-radius: 30px; border: 0.488px solid rgba(0, 0, 0, 0.06); box-shadow: 0 3.902px 46.829px 0 rgba(0, 0, 0, 0.08); height: 30px; box-sizing: border-box; font-size: 13.659px; font-style: normal; font-weight: 400; line-height: 17.561px; flex: 1; .nut-input { padding: 0; } } } .inputCustomerNavbarShowInput { padding-left: 10px; .logo { width: 32px; height: 32px; } } .toggleElement { /* 绝对定位使两个元素重叠 */ position: absolute; top: 0; left: 0; width: 100%; height: 100%; /* 启用硬件加速 */ will-change: opacity, transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; /* 优化过渡动画,使用更平滑的缓动函数和更短的动画时间 */ transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); } /* 第一个元素样式 */ .firstElement {} /* 第二个元素样式 */ .secondElement { /* 初始状态:透明且稍微偏移 */ opacity: 0; transform: translateY(-5px); } /* 隐藏状态 */ .hidden { opacity: 0; transform: translateY(-5px); pointer-events: none; } /* 可见状态 */ .visible { opacity: 1; transform: translateY(0); pointer-events: auto; }