UNPKG

tdesign-mobile-vue

Version:
171 lines (144 loc) 3.25 kB
@import '../../base.less'; @import './_var.less'; .@{prefix}-swiper-nav { &__dots, &__dots-bar { display: flex; flex-direction: row; &-item { width: @swiper-nav-dot-size; height: @swiper-nav-dot-size; background: @swiper-nav-dot-color; border-radius: 50%; margin: 0 5px; transition: all .4s ease-in; &--vertical { margin: 5px 0; } &--active { background-color: @swiper-nav-dot-active-color; } } } &__dots-bar { &-item { &--vertical&--active { width: @swiper-nav-dot-size; height: @swiper-nav-dots-bar-active-width; } &--active { width: @swiper-nav-dots-bar-active-width; border-radius: calc(@swiper-nav-dot-size / 2); background-color: @swiper-nav-dot-active-color; } } } &--left { position: absolute; left: @swiper-nav-spacer; top: 50%; transform: translateY(-50%); } &--right { position: absolute; right: @swiper-nav-spacer; top: 50%; transform: translateY(-50%); } &--top-left { position: absolute; top: @swiper-nav-spacer; left: @swiper-nav-spacer; } &--top { position: absolute; left: 50%; top: @swiper-nav-spacer; transform: translateX(-50%); } &--top-right { position: absolute; top: @swiper-nav-spacer; right: @swiper-nav-spacer; } &--bottom-left { position: absolute; left: @swiper-nav-spacer; bottom: @swiper-nav-spacer; } &--bottom { position: absolute; left: 50%; bottom: @swiper-nav-spacer; transform: translateX(-50%); } &--bottom-right { position: absolute; right: @swiper-nav-spacer; bottom: @swiper-nav-spacer; } &--vertical { flex-direction: column; } &__fraction { padding: 0 8px; height: @swiper-nav-fraction-height; border-radius: calc(@swiper-nav-fraction-height / 2); background: @swiper-nav-fraction-bg-color; color: @swiper-nav-fraction-color; font: @swiper-nav-fraction-font; } &__btn { &--prev, &--next { position: absolute; top: 50%; transform: translateY(-50%); width: @swiper-nav-btn-size; height: @swiper-nav-btn-size; border-radius: 50%; background: @swiper-nav-btn-bg-color; &::after { content: ''; display: block; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-color: @swiper-nav-btn-color; border-style: solid; } } &--prev { left: 15px; &::after { margin-left: 2px; border-width: 1px 0 0 1px; transform: translate(-50%, -50%) rotateZ(-45deg); } } &--next { right: 15px; &::after { margin-left: -2px; border-width: 1px 1px 0 0; transform: translate(-50%, -50%) rotateZ(45deg); } } } &--outside { bottom: 0; .@{prefix}-swiper-nav { &__dots, &__dots-bar { &-item { background: @swiper-nav-outside-bg; &--active { background-color: @swiper-nav-outside-bg-active; } } } } } }