UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

180 lines (178 loc) 4.22 kB
/* #ifdef harmony */ /* #endif */ /* #ifndef harmony */ /* #endif */ .nut-fixednav { position: fixed; z-index: var(--nutui-fixednav-index, 900); display: inline-block; height: 50px; } .nut-fixednav.active .nut-fixednav-btn .nut-icon { transform: rotate(180deg); } .nut-fixednav.active .nut-fixednav-list { transform: translateX(0%) !important; } .nut-fixednav.active.nut-fixednav-left .nut-icon { transform: rotate(0deg); } .nut-fixednav-btn { box-sizing: border-box; position: absolute; z-index: var(--nutui-fixednav-index, 900); width: 70px; height: 100%; background: var(--nutui-fixednav-button-background, var(--nutui-color-primary, #ff0f23)); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2); display: flex; align-items: center; justify-content: center; } .nut-fixednav-btn .text { width: 24px; line-height: 13px; font-size: var(--nutui-font-size-s, 12px); color: #fff; flex-shrink: 0; } .nut-fixednav-btn .nut-icon { transition: all 0.3s; } .nut-fixednav-list { position: absolute; transition: all 0.5s; z-index: var(--nutui-fixednav-index, 900); flex-shrink: 0; height: 100%; background: var(--nutui-fixednav-background-color, #ffffff); display: flex; justify-content: space-between; box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, 0.2); } .nut-fixednav-list-item { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 50px; flex-shrink: 0; color: var(--nutui-fixednav-color, #1a1a1a); } .nut-fixednav-list-item .nut-fixednav-list-text { font-size: 10px; } .nut-fixednav-list-image { width: 20px; height: 20px; margin-bottom: 2px; } .nut-fixednav-right { right: 0; } .nut-fixednav-right .nut-fixednav-btn { right: 0; border-radius: 45px 0px 0px 45px; } .nut-fixednav-right .nut-fixednav-btn .nut-icon { margin-right: 5px; transform: rotate(0deg); } .nut-fixednav-right .nut-fixednav-list { right: 0; transform: translateX(100%); border-radius: 25px 0px 0px 25px; padding-left: 20px; padding-right: 80px; } .nut-fixednav-left { left: 0; } .nut-fixednav-left .nut-fixednav-btn { flex-direction: row-reverse; left: 0; border-radius: 0 45px 45px 0; } .nut-fixednav-left .nut-fixednav-btn .nut-icon { margin-left: 5px; transform: rotate(180deg); } .nut-fixednav-left .nut-fixednav-list { transform: translateX(-100%); left: 0; border-radius: 0px 25px 25px 0px; padding-left: 80px; padding-right: 20px; } [dir=rtl] .nut-fixednav-right, .nut-rtl .nut-fixednav-right { right: auto; left: 0; } [dir=rtl] .nut-fixednav.active .nut-icon, .nut-rtl .nut-fixednav.active .nut-icon { transform: rotate(0deg); } [dir=rtl] .nut-fixednav.active.nut-fixednav-left .nut-icon, .nut-rtl .nut-fixednav.active.nut-fixednav-left .nut-icon { transform: rotate(-180deg); } [dir=rtl] .nut-fixednav-btn, .nut-rtl .nut-fixednav-btn { right: auto; left: 0; border-radius: 0px 45px 45px 0px; } [dir=rtl] .nut-fixednav-btn .nut-icon, .nut-rtl .nut-fixednav-btn .nut-icon { margin-right: 0px; margin-left: 5px; transform: rotate(180deg); } [dir=rtl] .nut-fixednav-list, .nut-rtl .nut-fixednav-list { right: auto; left: 0; transform: translateX(-100%); border-radius: 0px 25px 25px 0px; box-shadow: -2px 2px 8px 0px rgba(0, 0, 0, 0.2); padding-right: 20px; padding-left: 80px; } [dir=rtl] .nut-fixednav-list-item .b, .nut-rtl .nut-fixednav-list-item .b { right: auto; left: 0; } [dir=rtl] .nut-fixednav-left, .nut-rtl .nut-fixednav-left { left: auto; right: 0; } [dir=rtl] .nut-fixednav-left .nut-fixednav-btn, .nut-rtl .nut-fixednav-left .nut-fixednav-btn { left: auto; right: 0; border-radius: 45px 0 0 45px; } [dir=rtl] .nut-fixednav-left .nut-fixednav-btn .nut-icon, .nut-rtl .nut-fixednav-left .nut-fixednav-btn .nut-icon { transform: rotate(0deg); margin-right: 5px; margin-left: 0px; } [dir=rtl] .nut-fixednav-left .nut-fixednav-list, .nut-rtl .nut-fixednav-left .nut-fixednav-list { transform: translateX(100%); right: auto; left: auto; border-radius: 25px 0px 0px 25px; padding-right: 80px; padding-left: 20px; } .nut-drag .nut-fixednav { position: relative; }