jquery.orgchart.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. .orgchart {
  2. display: inline-block;
  3. position: relative;
  4. top: 30px;
  5. min-height: 202px;
  6. min-width: 202px;
  7. -webkit-touch-callout: none;
  8. -webkit-user-select: none;
  9. -khtml-user-select: none;
  10. -moz-user-select: none;
  11. -ms-user-select: none;
  12. user-select: none;
  13. background-image: linear-gradient(90deg, rgba(200, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%), linear-gradient(rgba(200, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%);
  14. background-size: 10px 10px;
  15. border: 1px dashed rgba(0,0,0,0);
  16. transition: border .3s;
  17. padding: 20px;
  18. }
  19. .orgchart>.spinner {
  20. font-size: 100px;
  21. margin-top: 30px;
  22. color: rgba(68, 157, 68, 0.8);
  23. }
  24. .orgchart table {
  25. border-collapse: separate;
  26. }
  27. .orgchart>table:first-child{
  28. margin: 20px auto;
  29. }
  30. .oc-panel {
  31. position: absolute;
  32. left: 30px;
  33. top: 60px;
  34. z-index: 100;
  35. padding: 5px;
  36. }
  37. .oc-btn {
  38. margin: 2px 10px;
  39. position: relative;
  40. }
  41. /* node styling */
  42. .orgchart .node {
  43. display: inline-block;
  44. position: relative;
  45. margin: 0;
  46. padding: 5px;
  47. text-align: center;
  48. width: 130px;
  49. }
  50. .orgchart .node>.spinner {
  51. position: absolute;
  52. top: calc(50% - 15px);
  53. left: calc(50% - 15px);
  54. vertical-align: middle;
  55. font-size: 30px;
  56. color: rgba(68, 157, 68, 0.8);
  57. }
  58. .orgchart .node:hover {
  59. background-color: rgba(238, 217, 54, 0.5);
  60. transition: .5s;
  61. cursor: default;
  62. z-index: 20;
  63. }
  64. .orgchart .node.focused {
  65. background-color: rgba(238, 217, 54, 0.5);
  66. }
  67. .orgchart .node .title {
  68. position: relative;
  69. text-align: center;
  70. font-size: 12px;
  71. font-weight: bold;
  72. height: 20px;
  73. line-height: 20px;
  74. overflow: hidden;
  75. text-overflow: ellipsis;
  76. white-space: nowrap;
  77. background-color: rgba(217, 83, 79, 0.8);
  78. color: #fff;
  79. border-radius: 4px 4px 0 0;
  80. }
  81. .orgchart .node .title .symbol {
  82. float: left;
  83. margin-top: 4px;
  84. margin-left: 2px;
  85. }
  86. .orgchart .node .content {
  87. position: relative;
  88. width: 100%;
  89. font-size: 11px;
  90. line-height: 13px;
  91. padding: 2px;
  92. border-radius: 0 0 4px 4px;
  93. text-align: center;
  94. background-color: #eee;
  95. color: #333;
  96. overflow: hidden;
  97. }
  98. .orgchart .node .edge {
  99. font-size: 15px;
  100. position: absolute;
  101. color: rgba(68, 157, 68, 0.5);
  102. cursor: default;
  103. transition: .2s;
  104. transform: translate(0,0);
  105. -webkit-transition: .2s;
  106. -webkit-transform: translate(0,0);
  107. }
  108. .orgchart .edge:hover {
  109. color: #449d44;
  110. cursor: pointer;
  111. }
  112. .orgchart .node .topEdge {
  113. width: 100%;
  114. top: -5px;
  115. left: 0px;
  116. }
  117. .orgchart .node .rightEdge {
  118. width: 15px;
  119. top: calc(50% - 8px);
  120. right: -4px;
  121. }
  122. .orgchart .node .bottomEdge {
  123. width: 100%;
  124. left: 0px;
  125. top: auto;
  126. bottom: -4px;
  127. text-align: center;
  128. }
  129. .orgchart .node .leftEdge {
  130. width: 15px;
  131. top: calc(50% - 8px);
  132. left: -4px;
  133. }
  134. .orgchart .node .edge.fa-chevron-up:hover {
  135. transform: translate(0, -4px);
  136. -webkit-transform: translate(0, -4px);
  137. }
  138. .orgchart .node .edge.fa-chevron-down:hover {
  139. transform: translate(0, 4px);
  140. -webkit-transform: translate(0, 4px);
  141. }
  142. .orgchart .node .edge.fa-chevron-right:hover {
  143. transform: translate(4px, 0);
  144. -webkit-transform: translate(4px, 0);
  145. }
  146. .orgchart .node .edge.fa-chevron-right:hover ~ .fa-chevron-left {
  147. transform: translate(-4px, 0);
  148. -webkit-transform: translate(-4px, 0);
  149. }
  150. .orgchart .node .edge.fa-chevron-left:hover {
  151. transform: translate(-4px, 0);
  152. -webkit-transform: translate(-4px, 0);
  153. }
  154. /* the following cod doesn't work */
  155. .orgchart .node .edge.fa-chevron-left:hover ~ .fa-chevron-right {
  156. transform: translate(4px, 0);
  157. -webkit-transform: translate(4px, 0);
  158. }
  159. .rightEdgeTransitionToRight {
  160. transform: translate(4px, 0);
  161. -webkit-transform: translate(4px, 0);
  162. }
  163. .rightEdgeTransitionToLeft {
  164. transform: translate(-4px, 0);
  165. -webkit-transform: translate(-4px, 0);
  166. }
  167. .orgchart .node .avatar {
  168. width: 50px;
  169. height: 50px;
  170. float: left;
  171. margin: 5px;
  172. background: #eee;
  173. }
  174. .orgchart .down {
  175. background-color: rgba(217, 83, 79, 0.8);
  176. margin: 0px auto;
  177. height: 20px;
  178. width: 2px;
  179. }
  180. .orgchart td.top {
  181. border-top: 2px solid rgba(217, 83, 79, 0.8);
  182. }
  183. .orgchart td.left {
  184. border-left: 1px solid rgba(217, 83, 79, 0.8);
  185. }
  186. .orgchart td.right {
  187. border-right: 1px solid rgba(217, 83, 79, 0.8);
  188. }
  189. /* node cell */
  190. .orgchart td {
  191. text-align: center;
  192. vertical-align: top;
  193. padding: 0;
  194. }
  195. .chart-map {
  196. display: none;
  197. }
  198. .chart-preview {
  199. visibility: hidden;
  200. position: absolute;
  201. left: 40%;
  202. top: -80px;
  203. padding: 10px 50px;
  204. background: rgba(0,0,0,0.6);
  205. transition: .3s;
  206. color: #fff;
  207. }
  208. .chart-preview:hover {
  209. color: #fff;
  210. }
  211. .chart-preview:before {
  212. position: absolute;
  213. left: 50%;
  214. top: -20px;
  215. content: '';
  216. border: 10px solid transparent;
  217. border-bottom: 10px solid rgba(0,0,0,0.6);
  218. }
  219. .preview-show {
  220. top: 50px;
  221. visibility: visible;
  222. }