styles.scss 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. html, body {
  2. margin: 0;
  3. padding: 0;
  4. box-sizing: border-box;
  5. .sidenav-container{
  6. margin: 0;
  7. padding:0;
  8. top: 0;
  9. bottom: 0;
  10. left: 0;
  11. right: 0;
  12. display: block;
  13. position: absolute;
  14. overflow: hidden;
  15. &.left{
  16. &.fixed{
  17. .sidenav-drawer-container {
  18. transition: left 0.3s;
  19. left: 0;
  20. }
  21. .sidenav-content {
  22. margin-left: 240px;
  23. }
  24. }
  25. &.hover {
  26. .sidenav-drawer-container{
  27. transition: left 0.3s;
  28. left: -180px;
  29. &:hover {
  30. left: 0;
  31. }
  32. }
  33. .sidenav-content {
  34. margin-left: 60px;
  35. }
  36. }
  37. .sidenav-drawer>ul li>a>i {
  38. float: right;
  39. right: 10px;
  40. }
  41. }
  42. &.right{
  43. &.fixed {
  44. .sidenav-drawer-container{
  45. transition: right 0.3s;
  46. right: 0;
  47. }
  48. .sidenav-content {
  49. margin-right: 240px;
  50. }
  51. }
  52. &.hover{
  53. .sidenav-drawer-container{
  54. transition: right 0.3s;
  55. right: -180px;
  56. &:hover {
  57. right: 0;
  58. }
  59. }
  60. .sidenav-content {
  61. margin-right: 60px;
  62. }
  63. }
  64. .sidenav-drawer>ul li>a{
  65. >i {
  66. float: left;
  67. left: 10px;
  68. }
  69. >span {
  70. margin-left:40px;
  71. }
  72. }
  73. }
  74. .sidenav-drawer-container{
  75. z-index: 99999;
  76. display: block;
  77. position: absolute;
  78. top: 0;
  79. bottom: 0;
  80. width:240px;
  81. box-sizing: border-box;
  82. box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3);
  83. background-color: rgba(255, 0, 0, 1);
  84. .sidenav-drawer{
  85. .sidenav-background{
  86. position: absolute;
  87. z-index: 1;
  88. height: 100%;
  89. width: 100%;
  90. display: block;
  91. top: 0;
  92. left: 0;
  93. background-size: cover;
  94. background-position: center center;
  95. &:after {
  96. position: absolute;
  97. z-index: 3;
  98. width: 100%;
  99. height: 100%;
  100. content: "";
  101. display: block;
  102. background: #fff;
  103. opacity: .93;
  104. background-color: rgba(255, 0, 0, 1);
  105. opacity: .6;
  106. }
  107. }
  108. >ul{
  109. position: relative;
  110. z-index: 4;
  111. padding: 0;
  112. padding-bottom: 120px;
  113. list-style-type: none;
  114. margin: 10px 0 0 0;
  115. width: 258px;
  116. box-sizing: border-box;
  117. sidenav-drawer-item>li {
  118. padding: 4px 30px 4px 10px;
  119. width: 100%;
  120. box-sizing: border-box;
  121. > a {
  122. border-radius: 6px;
  123. color: #ffffff;
  124. display: block;
  125. padding: 10px 10px 10px 10px;
  126. position: relative;
  127. box-sizing: border-box;
  128. transition: all 0.3s;
  129. text-decoration: none;
  130. overflow: hidden;
  131. z-index: 0;
  132. &:hover {
  133. background-color: rgba(255, 255, 255, 0.3);
  134. }
  135. i {
  136. width: 20px;
  137. height: 20px;
  138. font-size: 20px;
  139. position: absolute;
  140. top: 50%;
  141. margin-top: -10px;
  142. }
  143. span {
  144. display: inline-block;
  145. max-width: 145px;
  146. }
  147. }
  148. &.active-item > a {
  149. // background-color: rgba(255, 255, 255, 0.5);
  150. background-color: #f90;
  151. color: #ffffff;
  152. }
  153. }
  154. }
  155. }
  156. }
  157. .sidenav-content{
  158. position: relative;
  159. z-index: 1;
  160. display: block;
  161. height: 100%;
  162. overflow: auto;
  163. }
  164. }
  165. }