UNPKG

@nutui/nutui-react

Version:

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

180 lines (178 loc) 4.73 kB
/* #ifdef harmony */ /* #endif */ /* #ifndef harmony */ /* #endif */ .nut-fixednav { position: fixed; z-index: var(--nutui-fixednav-index, 900); display: inline-block; height: scale-px(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: scale-px(70px); height: 100%; background: var(--nutui-fixednav-button-background, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff9999) 0%, var(--nutui-color-primary-stop-2, #ff6666) 100%)); box-shadow: 0 scale-px(2px) scale-px(4px) 0 rgba(0, 0, 0, 0.2); display: flex; align-items: center; justify-content: center; } .nut-fixednav-btn .text { width: scale-px(24px); line-height: scale-px(13px); font-size: var(--nutui-font-text-small); 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: scale-px(2px) scale-px(2px) scale-px(8px) 0 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: scale-px(50px); flex-shrink: 0; color: var(--nutui-fixednav-color, #1a1a1a); } .nut-fixednav-list-item .nut-fixednav-list-text { font-size: var(--nutui-font-text-mini); } .nut-fixednav-list-image { width: scale-px(20px); height: scale-px(20px); margin-bottom: scale-px(2px); } .nut-fixednav-right { right: 0; } .nut-fixednav-right .nut-fixednav-btn { right: 0; border-radius: scale-px(45px) 0 0 scale-px(45px); } .nut-fixednav-right .nut-fixednav-btn .nut-icon { margin-right: scale-px(5px); transform: rotate(0deg); } .nut-fixednav-right .nut-fixednav-list { right: 0; transform: translateX(100%); border-radius: scale-px(25px) 0 0 scale-px(25px); padding-left: scale-px(20px); padding-right: scale-px(80px); } .nut-fixednav-left { left: 0; } .nut-fixednav-left .nut-fixednav-btn { flex-direction: row-reverse; left: 0; border-radius: 0 scale-px(45px) scale-px(45px) 0; } .nut-fixednav-left .nut-fixednav-btn .nut-icon { margin-left: scale-px(5px); transform: rotate(180deg); } .nut-fixednav-left .nut-fixednav-list { transform: translateX(-100%); left: 0; border-radius: 0 scale-px(25px) scale-px(25px) 0; padding-left: scale-px(80px); padding-right: scale-px(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: 0 scale-px(45px) scale-px(45px) 0; } [dir=rtl] .nut-fixednav-btn .nut-icon, .nut-rtl .nut-fixednav-btn .nut-icon { margin-right: 0; margin-left: scale-px(5px); transform: rotate(180deg); } [dir=rtl] .nut-fixednav-list, .nut-rtl .nut-fixednav-list { right: auto; left: 0; transform: translateX(-100%); border-radius: 0 scale-px(25px) scale-px(25px) 0; box-shadow: scale-px(-2px) scale-px(2px) scale-px(8px) 0 rgba(0, 0, 0, 0.2); padding-right: scale-px(20px); padding-left: scale-px(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: scale-px(45px) 0 0 scale-px(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: scale-px(5px); margin-left: 0; } [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: scale-px(25px) 0 0 scale-px(25px); padding-right: scale-px(80px); padding-left: scale-px(20px); } .nut-drag .nut-fixednav { position: relative; }