.header-layout { $ts: all .7s cubic-bezier(.77, 0, .175, 1); $split: #7f7f7f; background-color: #101010; display: flex; color: #fff; justify-content: space-between; .child-layout { position: absolute; top: 100%; max-height: 0; left: 0; right: 0; transition: $ts; overflow: hidden; .silp { position: absolute; width: 1px; height: 100%; background-color: $split; z-index: 2; } } .logo-layout { flex: 0 1 340px; text-align: center; .logo { position: relative; width: 150px; height: 100%; display: inline-block; i { position: absolute; left: 50%; top: 60%; transform: translateX(-50%) translateY(-50%); } .icon-logo_b { font-size: 110px; color: #fff; } .icon-logo_a { font-size: 40px; margin-left: -48px; margin-top: -6px; color: #1fe4dc; } } } .menu { flex: 1; display: flex; .lang { box-sizing: border-box; text-align: center; padding-right: 10px; min-width: 100px; a { display: inline-block; font-size: 16px; font-weight: bold; margin-left: 5px; } } .list { border-left: 1px solid $split; padding: 0 20px; display: flex; min-width: 480px; max-width: 750px; justify-content: space-between; flex: 1; a { display: inline-block; padding: 25px 20px 25px 0; font-size: 16px; text-decoration: none; font-weight: bold; position: relative; flex: auto; &::after { display: none; content: ''; border: 6px solid transparent; position: absolute; right: 0; top: 50%; transform: translateY(-50%); } } } } .ctrl { flex: 0 0 auto; a { display: inline-block; text-decoration: none; padding: 0 14px; height: 100%; i, span { display: inline-block; vertical-align: middle; } i { font-size: 24px; } span { font-size: 16px; margin-left: 4px; font-weight: bold; } &.user { background-color: #fff; color: #101010 } } .search { position: relative; .hide, .open { transition: $ts } .open { opacity: 1; transform: scale(1); } .hide { opacity: 0; transform: scale(0); position: absolute; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); font-size: 16px; } &.active { .open { opacity: 0; transform: scale(0); } .hide { opacity: 1; transform: scale(1) translateX(-50%) translateY(-50%); } } } } }