index.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. box-sizing: border-box;
  54. padding: 0;
  55. margin: 0;
  56. z-index: $fixednav-index;
  57. flex-shrink: 0;
  58. height: 100%;
  59. background: $fixednav-bg-color;
  60. display: flex;
  61. justify-content: space-between;
  62. border-radius: 25px 0px 0px 25px;
  63. box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, 0.2);
  64. padding: {
  65. left: 20px;
  66. right: 80px;
  67. }
  68. &-item {
  69. box-sizing: border-box;
  70. padding: 0;
  71. margin: 0;
  72. position: relative;
  73. flex: 1;
  74. height: 100%;
  75. display: flex;
  76. flex-direction: column;
  77. justify-content: center;
  78. align-items: center;
  79. min-width: 50px;
  80. flex-shrink: 0;
  81. &.active {
  82. > .span {
  83. color: $fixednav-item-active-color;
  84. }
  85. }
  86. > img {
  87. width: 20px;
  88. height: 20px;
  89. margin-bottom: 2px;
  90. }
  91. > .span {
  92. font-size: 10px;
  93. color: $fixednav-font-color;
  94. }
  95. > .b {
  96. position: absolute;
  97. right: 0;
  98. top: 1px;
  99. height: 14px;
  100. line-height: 14px;
  101. font-size: 10px;
  102. padding: 0 3px;
  103. color: white;
  104. background: $primary-color;
  105. border-radius: 7px;
  106. text-align: center;
  107. min-width: 12px;
  108. }
  109. }
  110. }
  111. &.left {
  112. right: auto;
  113. left: 0;
  114. .nut-fixednav__btn {
  115. flex-direction: row-reverse;
  116. right: auto;
  117. left: 0;
  118. border-radius: 0 45px 45px 0;
  119. .nut-icon {
  120. transform: rotate(180deg);
  121. }
  122. }
  123. .nut-fixednav__list {
  124. transform: translateX(-100%);
  125. right: auto;
  126. border-radius: 0px 25px 25px 0px;
  127. padding: {
  128. left: 80px;
  129. right: 20px;
  130. }
  131. }
  132. }
  133. }