zui.mindmap.css 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. /*!
  2. * ZUI: 思维导图 - v1.10.0 - 2022-05-20
  3. * http://openzui.com
  4. * GitHub: https://github.com/easysoft/zui.git
  5. * Copyright (c) 2022 cnezsoft.com; Licensed MIT
  6. */
  7. .mindmap
  8. {
  9. position: relative;
  10. z-index: 0;
  11. overflow: hidden;
  12. }
  13. .mindmap-container
  14. {
  15. position: absolute;
  16. top: 0;
  17. left: 0;
  18. z-index: 1;
  19. width: 100%;
  20. height: 100%;
  21. background: #fff;
  22. border: 1px solid #e5e5e5;
  23. }
  24. .mindmap-container.dragging
  25. {
  26. cursor: pointer;
  27. }
  28. .mindmap-bg
  29. {
  30. position: absolute;
  31. top: 0;
  32. left: 0;
  33. z-index: 5;
  34. max-width: inherit;
  35. }
  36. .mindmap-desktop
  37. {
  38. position: absolute;
  39. top: 0;
  40. left: 0;
  41. z-index: 10;
  42. width: 100%;
  43. height: 100%;
  44. overflow: hidden;
  45. -webkit-user-select: none;
  46. -moz-user-select: none;
  47. }
  48. .mindmap-node
  49. {
  50. position: absolute;
  51. border-radius: 24px;
  52. }
  53. .mindmap-node > .wrapper
  54. {
  55. min-height: 28px;
  56. background: #ebf2f9;
  57. border: 4px solid #aaa;
  58. border-radius: 22px;
  59. -webkit-transition: all .2s cubic-bezier(.175, .885, .32, 1);
  60. -o-transition: all .2s cubic-bezier(.175, .885, .32, 1);
  61. transition: all .2s cubic-bezier(.175, .885, .32, 1);
  62. }
  63. .mindmap-node > .wrapper > .text
  64. {
  65. padding: 8px 12px;
  66. font-size: 14px;
  67. font-weight: bold;
  68. cursor: default;
  69. }
  70. .mindmap-node > .wrapper > .text *
  71. {
  72. display: inline;
  73. }
  74. .mindmap-node > .wrapper > .text br
  75. {
  76. display: none;
  77. }
  78. .mindmap-node > .wrapper > .text:focus
  79. {
  80. outline: none;
  81. }
  82. .mindmap-node > .wrapper > .text:empty:not(:focus)
  83. {
  84. position: relative;
  85. top: 7px;
  86. min-width: 10px;
  87. min-height: 10px;
  88. background: #508dee;
  89. border-radius: 50%;
  90. }
  91. .mindmap-node > .wrapper > .caption
  92. {
  93. display: none;
  94. }
  95. .mindmap-node:hover
  96. {
  97. -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .4);
  98. box-shadow: 0 0 5px rgba(0, 0, 0, .4);
  99. }
  100. .mindmap-node:hover > .wrapper
  101. {
  102. border-color: #999;
  103. }
  104. .mindmap-node[data-type="root"] > .wrapper
  105. {
  106. min-width: 45px;
  107. min-height: 45px;
  108. }
  109. .mindmap-node[data-type="root"] > .wrapper > .text
  110. {
  111. text-align: center;
  112. }
  113. .mindmap-node[data-type="root"] > .wrapper > .text:empty:not(:focus)
  114. {
  115. top: 0;
  116. min-width: 37px;
  117. min-height: 37px;
  118. background: none;
  119. border-radius: 50%;
  120. }
  121. .mindmap-node[data-type="sub"]
  122. {
  123. border-radius: 6px;
  124. }
  125. .mindmap-node[data-type="sub"] > .wrapper
  126. {
  127. background: #fff;
  128. border-width: 2px;
  129. border-radius: 5px;
  130. }
  131. .mindmap-node[data-type="sub"] > .wrapper > .text
  132. {
  133. padding: 3px 5px;
  134. font-size: 13px;
  135. font-weight: normal;
  136. }
  137. .mindmap-node[data-type="sub"] > .wrapper > .text:empty:not(:focus)
  138. {
  139. background: none;
  140. }
  141. .mindmap-node[data-type="node"]
  142. {
  143. border-radius: 4px;
  144. }
  145. .mindmap-node[data-type="node"] > .wrapper
  146. {
  147. background: transparent;
  148. border: 2px solid transparent;
  149. border-radius: 3px;
  150. }
  151. .mindmap-node[data-type="node"] > .wrapper > .text
  152. {
  153. padding: 3px 3px;
  154. font-size: 13px;
  155. font-weight: normal;
  156. }
  157. .mindmap-node[data-type="node"]:hover > .wrapper
  158. {
  159. color: #353535;
  160. background: #fff;
  161. border-color: #999;
  162. }
  163. .mindmap-node.active,
  164. .mindmap-node.active:hover,
  165. .mindmap-node.drag-shadow
  166. {
  167. z-index: 900;
  168. -webkit-box-shadow: none;
  169. box-shadow: none;
  170. }
  171. .mindmap-node.active > .wrapper,
  172. .mindmap-node.active:hover > .wrapper,
  173. .mindmap-node.drag-shadow > .wrapper
  174. {
  175. color: #fff;
  176. background: #508dee;
  177. border-color: #2a74ea;
  178. }
  179. .mindmap-node.focus,
  180. .mindmap-node.focus:hover,
  181. .mindmap-node.drop-to
  182. {
  183. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(20, 92, 205, .6);
  184. box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(20, 92, 205, .6);
  185. }
  186. .mindmap-node.focus > .wrapper,
  187. .mindmap-node.focus:hover > .wrapper,
  188. .mindmap-node.drop-to > .wrapper
  189. {
  190. color: #353535;
  191. background: #fff;
  192. border-color: #145ccd;
  193. }
  194. .mindmap-node.focus > .wrapper > .text,
  195. .mindmap-node.focus:hover > .wrapper > .text,
  196. .mindmap-node.drop-to > .wrapper > .text
  197. {
  198. cursor: text;
  199. }
  200. .mindmap-node .btn-toggle
  201. {
  202. position: absolute;
  203. top: 50%;
  204. right: -14px;
  205. display: none;
  206. width: 16px;
  207. height: 16px;
  208. margin-top: -9px;
  209. font-size: 16px;
  210. line-height: 12px;
  211. color: #fff;
  212. text-align: center;
  213. cursor: pointer;
  214. visibility: hidden;
  215. background: #808080;
  216. border: 1px solid transparent;
  217. border-radius: 50%;
  218. opacity: 0;
  219. -webkit-transition-duration: .2s;
  220. -o-transition-duration: .2s;
  221. transition-duration: .2s;
  222. -webkit-transition-property: visibility, opacity, border-color, -webkit-box-shadow;
  223. -o-transition-property: visibility, opacity, border-color, box-shadow;
  224. transition-property: visibility, opacity, border-color, -webkit-box-shadow;
  225. transition-property: visibility, opacity, border-color, box-shadow;
  226. transition-property: visibility, opacity, border-color, box-shadow, -webkit-box-shadow;
  227. }
  228. .mindmap-node .btn-toggle:hover
  229. {
  230. background: #3280fc;
  231. border-color: rgba(0, 0, 0, .1);
  232. -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .4);
  233. box-shadow: 0 0 5px rgba(0, 0, 0, .4);
  234. }
  235. .mindmap-node .btn-toggle:before
  236. {
  237. content: '-';
  238. }
  239. .mindmap-node.mindmap-side-left .btn-toggle
  240. {
  241. right: auto;
  242. left: -14px;
  243. }
  244. .mindmap-node.mindmap-collapesed .btn-toggle:before
  245. {
  246. content: '+';
  247. }
  248. .mindmap-node[data-type="root"] .btn-toggle
  249. {
  250. display: none!important;
  251. }
  252. .mindmap-show-toggle-btn .mindmap-has-child .btn-toggle
  253. {
  254. display: block;
  255. }
  256. .mindmap-show-toggle-btn .mindmap-node.focus .btn-toggle
  257. {
  258. display: none;
  259. }
  260. .mindmap-show-toggle-btn .mindmap-node.mindmap-collapesed .btn-toggle,
  261. .mindmap-show-toggle-btn .mindmap-node:hover .btn-toggle
  262. {
  263. visibility: visible;
  264. opacity: 1;
  265. }
  266. .mindmap-shadow
  267. {
  268. position: absolute;
  269. z-index: 1000;
  270. width: 100%;
  271. height: 100%;
  272. -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1);
  273. -o-transition: all .4s cubic-bezier(.175, .885, .32, 1);
  274. transition: all .4s cubic-bezier(.175, .885, .32, 1);
  275. }
  276. .mindmap-shadow.shadow-left,
  277. .mindmap-shadow.shadow-right
  278. {
  279. top: 0;
  280. width: 20px;
  281. }
  282. .mindmap-shadow.shadow-left
  283. {
  284. left: -20px;
  285. }
  286. .mindmap-shadow.shadow-right
  287. {
  288. right: -20px;
  289. }
  290. .mindmap-shadow.shadow-top,
  291. .mindmap-shadow.shadow-bottom
  292. {
  293. left: 0;
  294. height: 20px;
  295. }
  296. .mindmap-shadow.shadow-top
  297. {
  298. top: -20px;
  299. }
  300. .mindmap-shadow.shadow-bottom
  301. {
  302. bottom: -20px;
  303. }
  304. .shadow-left > .shadow-left,
  305. .shadow-right > .shadow-right,
  306. .shadow-top > .shadow-top,
  307. .shadow-bottom > .shadow-bottom
  308. {
  309. -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
  310. box-shadow: 0 0 8px rgba(0, 0, 0, .8);
  311. }