UNPKG

@bytedance/mona-client-web

Version:

web for mona

100 lines (91 loc) 1.79 kB
.container { position: fixed; left: 0; right: 0; bottom: 0; height: 48px; background-color: #fff; display: flex; z-index: 9990; align-items: center; border-top: 1px solid transparent; transform: translateY(0); padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/ padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/ &.hidden { display: none; } } .mona-tabbar-extra-height { padding-bottom: 48px; padding-bottom: calc(constant(safe-area-inset-bottom) + 48px); /*兼容 IOS<11.2*/ padding-bottom: calc(env(safe-area-inset-bottom) + 48px); } .item { text-align: center; flex: 1; width: 0; } .badge { position: relative; width: 30px; height: 30px; margin: auto; & .redDot { width: 8px; height: 8px; border-radius: 50%; position: absolute; background-color: #ff4d4f; top: 2px; right: 0; } & .image { display: block; width: 30px; height: 30px; margin: auto; } & .text { top: -2px; right: -100%; max-width: 40px; position: absolute; background-color: #ff4d4f; box-shadow: 0 0 1px #fff; border-radius: 10px; padding: 0 6px; color: #fff; font-weight: 400; font-size: 12px; height: 20px; line-height: 20px; white-space: nowrap; text-align: center; transform: scale(.8); transform-origin: 0 0; text-overflow: ellipsis; overflow: hidden; } & .dot { top: 0; right: 0; position: absolute; width: 6px; min-width: 6px; height: 6px; background-color: #ff4d4f; box-shadow: 0 0 1px #fff; border-radius: 100%; } } .desc { font-size: 12px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; transform: scale(.91); }