index.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .nut-fixednav {
  2. position: fixed;
  3. z-index: $fixednav-index;
  4. display: inline-block;
  5. height: 50px;
  6. right: 0;
  7. &.active {
  8. .nut-icon {
  9. transform: rotate(180deg);
  10. }
  11. .nut-fixednav__list {
  12. transform: translateX(0%) !important;
  13. }
  14. &.left {
  15. .nut-icon {
  16. transform: rotate(0deg) !important;
  17. }
  18. }
  19. }
  20. &__btn {
  21. box-sizing: border-box;
  22. position: absolute;
  23. right: 0;
  24. z-index: $fixednav-index + 1;
  25. width: 80px;
  26. padding-left: 12px;
  27. height: 100%;
  28. background: $fixednav-btn-bg;
  29. border-radius: 45px 0px 0px 45px;
  30. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. > .text {
  35. width: 24px;
  36. line-height: 13px;
  37. font-size: 10px;
  38. color: $fixednav-bg-color;
  39. flex-shrink: 0;
  40. }
  41. .nut-icon {
  42. margin-right: 5px;
  43. transition: all 0.3s;
  44. transform: rotate(0deg);
  45. transition: all 0.3s;
  46. }
  47. }
  48. &__list {
  49. position: absolute;
  50. right: 0;
  51. transform: translateX(100%);
  52. transition: all 0.5s;
  53. z-index: $fixednav-index;
  54. flex-shrink: 0;
  55. height: 100%;
  56. background: $fixednav-bg-color;
  57. display: flex;
  58. justify-content: space-between;
  59. border-radius: 25px 0px 0px 25px;
  60. box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, 0.2);
  61. padding: {
  62. left: 20px;
  63. right: 80px;
  64. }
  65. &-item {
  66. position: relative;
  67. flex: 1;
  68. height: 100%;
  69. display: flex;
  70. flex-direction: column;
  71. justify-content: center;
  72. align-items: center;
  73. min-width: 50px;
  74. flex-shrink: 0;
  75. > img {
  76. width: 20px;
  77. height: 20px;
  78. margin-bottom: 2px;
  79. }
  80. > .span {
  81. font-size: 10px;
  82. color: $fixednav-font-color;
  83. }
  84. > .b {
  85. position: absolute;
  86. right: 0;
  87. top: 1px;
  88. height: 14px;
  89. line-height: 14px;
  90. font-size: 10px;
  91. padding: 0 3px;
  92. color: white;
  93. background: $primary-color;
  94. border-radius: 7px;
  95. text-align: center;
  96. min-width: 12px;
  97. }
  98. }
  99. }
  100. &.left {
  101. right: auto;
  102. left: 0;
  103. .nut-fixednav__btn {
  104. flex-direction: row-reverse;
  105. right: auto;
  106. left: 0;
  107. border-radius: 0 45px 45px 0;
  108. .nut-icon {
  109. transform: rotate(180deg);
  110. }
  111. }
  112. .nut-fixednav__list {
  113. transform: translateX(-100%);
  114. right: auto;
  115. border-radius: 0px 25px 25px 0px;
  116. padding: {
  117. left: 80px;
  118. right: 20px;
  119. }
  120. }
  121. }
  122. }