index.less 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. @import "../styles/mixins/index.less";
  2. @import "../styles/themes/index.less";
  3. .@{wux-prefix}-index {
  4. width: 100%;
  5. position: relative;
  6. overflow: hidden;
  7. &__nav {
  8. position: fixed;
  9. top: 50%;
  10. right: 0;
  11. transform: translate3d(0, -50%, 0);
  12. cursor: pointer;
  13. user-select: none;
  14. text-align: center;
  15. &-row {
  16. display: flex;
  17. flex-direction: column;
  18. justify-content: center;
  19. align-items: center;
  20. flex-shrink: 0;
  21. height: 100%;
  22. width: 100%;
  23. position: relative;
  24. line-height: @index-nav-size;
  25. font-size: @index-nav-font-size;
  26. }
  27. &-col {
  28. padding: @index-nav-padding / 2 @index-nav-padding;
  29. line-height: inherit;
  30. font-size: inherit;
  31. }
  32. &-item {
  33. display: inline-flex;
  34. width: @index-nav-size;
  35. height: @index-nav-size;
  36. line-height: inherit;
  37. font-size: inherit;
  38. justify-content: center;
  39. align-items: center;
  40. &--current {
  41. color: @text-color-inverse;
  42. background-color: @balanced;
  43. border-radius: 50%;
  44. }
  45. }
  46. }
  47. &__indicator {
  48. width: @index-indicator-size;
  49. height: @index-indicator-size;
  50. line-height: @index-indicator-size;
  51. text-align: center;
  52. background-color: @index-indicator-bg;
  53. border-radius: @index-indicator-border-radius;
  54. color: @index-indicator-color;
  55. font-size: @index-indicator-font-size;
  56. &--center {
  57. position: fixed;
  58. top: 50%;
  59. left: 50%;
  60. transform: translate3d(-50%, -50%, 0);
  61. }
  62. &--right {
  63. position: absolute;
  64. top: calc(@index-nav-size / 2 + @index-nav-padding / 2);
  65. right: 100%;
  66. border-radius: 50%;
  67. transform: translateY(-50%);
  68. margin-right: calc(@index-nav-size - 1px);
  69. background-color: @balanced;
  70. &::before {
  71. position: absolute;
  72. width: 100%;
  73. height: 100%;
  74. border-radius: 50% 0% 50% 50%;
  75. content: '';
  76. background-color: inherit;
  77. left: 0;
  78. top: 0;
  79. transform: rotate(45deg);
  80. z-index: -1;
  81. }
  82. }
  83. }
  84. }