index.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. > img {
  82. width: 20px;
  83. height: 20px;
  84. margin-bottom: 2px;
  85. }
  86. > .span {
  87. font-size: 10px;
  88. color: $fixednav-font-color;
  89. }
  90. > .b {
  91. position: absolute;
  92. right: 0;
  93. top: 1px;
  94. height: 14px;
  95. line-height: 14px;
  96. font-size: 10px;
  97. padding: 0 3px;
  98. color: white;
  99. background: $primary-color;
  100. border-radius: 7px;
  101. text-align: center;
  102. min-width: 12px;
  103. }
  104. }
  105. }
  106. &.left {
  107. right: auto;
  108. left: 0;
  109. .nut-fixednav__btn {
  110. flex-direction: row-reverse;
  111. right: auto;
  112. left: 0;
  113. border-radius: 0 45px 45px 0;
  114. .nut-icon {
  115. transform: rotate(180deg);
  116. }
  117. }
  118. .nut-fixednav__list {
  119. transform: translateX(-100%);
  120. right: auto;
  121. border-radius: 0px 25px 25px 0px;
  122. padding: {
  123. left: 80px;
  124. right: 20px;
  125. }
  126. }
  127. }
  128. }