tree.css 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /* Remove default bullets */
  2. ul, #myUL {
  3. list-style-type: none;
  4. }
  5. /* Remove margins and padding from the parent ul */
  6. #myUL {
  7. margin: 0;
  8. padding: 0;
  9. }
  10. /* Style the caret/arrow */
  11. .caret {
  12. cursor: pointer;
  13. user-select: none; /* Prevent text selection */
  14. }
  15. /* Create the caret/arrow with a unicode, and style it */
  16. .caret::before {
  17. content: "\25B6";
  18. color: black;
  19. display: inline-block;
  20. margin-right: 6px;
  21. }
  22. /* Rotate the caret/arrow icon when clicked on (using JavaScript) */
  23. .caret-down::before {
  24. transform: rotate(90deg);
  25. }
  26. /* Hide the nested list */
  27. .nested {
  28. display: none;
  29. }
  30. /* Show the nested list when the user clicks on the caret/arrow (with JavaScript) */
  31. .active {
  32. display: block;
  33. }
  34. .parent-style {
  35. border: 1px solid #f37227;
  36. border-radius: 5px;
  37. padding: 5px;
  38. background: #ff6a00;
  39. color: white;
  40. max-width: 200px;
  41. margin-top: 10px;
  42. margin-bottom: 10px;
  43. width: fit-content;
  44. }
  45. .parent-style:hover {
  46. filter: brightness(80%);
  47. color: white;
  48. }
  49. .none-parent-style {
  50. border: 1px solid #f3f7fe;
  51. border-radius: 5px;
  52. padding: 5px;
  53. background: #f3f7fe;
  54. color: #6c6b6b;
  55. max-width: 200px;
  56. margin-top: 10px;
  57. margin-bottom: 10px;
  58. width: fit-content;
  59. }
  60. .none-parent-style:hover {
  61. filter: brightness(80%);
  62. color: black;
  63. }
  64. .pointer-style {
  65. }
  66. .tree-container {
  67. background: white;
  68. /*margin: 25px;*/
  69. border: 1px solid #eee2e2;
  70. /*padding: 20px;*/
  71. /*padding-bottom: 20px;*/
  72. }
  73. .title {
  74. display: inline-block;
  75. }
  76. .tree-box {
  77. margin-bottom: 1.875rem;
  78. border: none;
  79. border-radius: 0;
  80. box-shadow: 0 10px 40px 0 rgba(62,57,107,.07), 0 2px 9px 0 rgba(62,57,107,.06);
  81. padding: 20px;
  82. }
  83. /** * {
  84. margin: 0;
  85. padding: 0;
  86. box-sizing: border-box;
  87. }
  88. body {
  89. background-color: #ccc;
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. height: 100vh;
  94. font-family: sans-serif;
  95. }*/
  96. #clickable {
  97. display: block;
  98. background-color: #efefef;
  99. height: 300px;
  100. width: 300px;
  101. border-radius: 20px;
  102. box-shadow: 0px 5px 30px -10px grey;
  103. display: flex;
  104. align-items: center;
  105. justify-content: center;
  106. font-size: 32px;
  107. color: grey;
  108. }
  109. #menu {
  110. display: block;
  111. background-color: white;
  112. padding: 10px 0px;
  113. border-radius: 5px;
  114. box-shadow: 2px 2px 30px lightgrey;
  115. position: absolute;
  116. transform-origin: center;
  117. z-index: 2;
  118. opacity: 0;
  119. transform: scale(0);
  120. transition: transform 0.2s, opacity 0.2s;
  121. width: 200px;
  122. }
  123. #menu.show-top {
  124. opacity: 1;
  125. transform: scale(1);
  126. transform-origin: top left;
  127. }
  128. #menu.show-bottom {
  129. opacity: 1;
  130. transform: scale(1);
  131. transform-origin: bottom left;
  132. }
  133. .menu-item {
  134. display: block;
  135. padding: 10px 30px;
  136. transition: 0.1s;
  137. color: #666;
  138. }
  139. .menu-item:hover {
  140. background-color: #eee;
  141. cursor: pointer;
  142. }
  143. #out-click {
  144. height: 100vh;
  145. width: 100vw;
  146. position: fixed;
  147. top: 0;
  148. left: 0;
  149. z-index: 1;
  150. display: none;
  151. }