styles.css 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. body {
  2. font-family: Arial, sans-serif;
  3. background-color: #f0f0f0;
  4. display: flex;
  5. justify-content: center;
  6. align-items: flex-start;
  7. min-height: 100vh;
  8. margin: 0;
  9. padding-top: 20px;
  10. }
  11. .card-container {
  12. width: 90%;
  13. max-width: 1200px;
  14. display: flex;
  15. flex-wrap: wrap;
  16. gap: 1em;
  17. }
  18. .card {
  19. background: white;
  20. border-radius: 10px;
  21. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  22. overflow: hidden;
  23. padding: 1em;
  24. text-align: center;
  25. cursor: pointer;
  26. width: calc(33% - 1em);
  27. }
  28. .add-card {
  29. display: flex;
  30. justify-content: center;
  31. align-items: center;
  32. cursor: pointer;
  33. height: 150px;
  34. font-size: 2em;
  35. color: #888;
  36. border: 2px dashed #ccc;
  37. width: calc(33% - 1em);
  38. order: 999;
  39. }
  40. .add-icon {
  41. font-weight: bold;
  42. }
  43. .card img {
  44. width: 100%;
  45. height: auto;
  46. border-radius: 10px;
  47. margin-bottom: 0.5em;
  48. }
  49. .card .title {
  50. font-size: 1.2em;
  51. font-weight: bold;
  52. margin-bottom: 0.5em;
  53. }
  54. .card .content {
  55. font-size: 1em;
  56. color: #555;
  57. }
  58. .card .date {
  59. font-size: 0.8em;
  60. color: #999;
  61. margin-top: 0.5em;
  62. }
  63. /*点击卡片弹出的模态框*/
  64. .card-modal {
  65. position: fixed; /* 固定定位,使模态框相对于视口固定 */
  66. top: 0; /* 距离视口顶部0,贴齐顶部 */
  67. left: 0; /* 距离视口左侧0,贴齐左边 */
  68. width: 100%; /* 宽度占满整个视口 */
  69. height: 100%; /* 高度占满整个视口 */
  70. background: rgba(0, 0, 0, 0.5);/* 半透明黑色背景,营造遮罩效果 */
  71. display: flex; /* 使用Flex布局 */
  72. visibility: hidden; /* 初始状态下隐藏模态框 */
  73. }
  74. .card-modal.active {
  75. visibility: visible; /* 添加active类后,模态框可见 */
  76. }
  77. .card-modal-container {
  78. width: 100%; /* 容器宽度为父元素的90% */
  79. display: flex; /* 使用Flex布局 */
  80. flex-wrap: wrap; /* 允许子元素换行 */
  81. gap: 1em; /* 子元素之间的间距为1em */
  82. }
  83. .card-modal-left {
  84. width: 10%;
  85. background: #f3f3f3;
  86. }
  87. .card-modal-right {
  88. width: 85%;
  89. background: #f3f3f3;
  90. }
  91. .card-modal-group-box-container {
  92. margin-left: 250px; /* 左外边距 */
  93. display: flex; /* 使用Flex布局 */
  94. flex-wrap: wrap; /* 允许子元素换行 */
  95. gap: 1em; /* 子元素之间的间距为1em */
  96. }
  97. /*模态框里的节点组*/
  98. .card-modal-group-box {
  99. background: white; /* 背景颜色为白色 */
  100. border-radius: 10px; /* 圆角半径为10像素 */
  101. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
  102. overflow: hidden; /* 隐藏超出部分内容 */
  103. padding: 1em; /* 内边距为1em */
  104. margin-left: 25px; /* 左外边距 */
  105. margin-top: 30px;
  106. text-align: center; /* 文本居中对齐 */
  107. cursor: pointer; /* 鼠标悬停时显示指针样式 */
  108. width: calc(18% - 1em); /* 宽度为33%减去1em */
  109. }
  110. .card-modal-group-box .state-box {
  111. width: 100%; /* 设置宽度为60像素 */
  112. height: 90px; /* 设置高度为90像素 */
  113. display: flex; /* 使用 Flex 布局 */
  114. justify-content: center; /* 水平居中对齐内容 */
  115. align-items: center; /* 垂直居中对齐内容 */
  116. background: linear-gradient(to bottom, #f9f9f9, #eaeaea); /* 添加柔和的渐变背景 */
  117. border-radius: 12px; /* 圆角半径为12像素,营造圆润效果 */
  118. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加细腻的阴影 */
  119. font-size: 16px; /* 设置字体大小 */
  120. font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* 使用苹果常用字体 */
  121. color: #333; /* 设置深灰色字体 */
  122. }
  123. .card-modal-group-box .title {
  124. font-size: 1.2em;
  125. font-weight: bold;
  126. margin-bottom: 0.5em;
  127. }
  128. .card-modal-group-box .content {
  129. font-size: 1em;
  130. color: #555;
  131. }
  132. /*关闭模态框按钮*/
  133. .card-modal-close-button {
  134. position: absolute;
  135. top: 10px;
  136. left: 10px;
  137. background: #007bff;
  138. color: #fff;
  139. border: none;
  140. border-radius: 5px;
  141. padding: 0.5em 1em;
  142. cursor: pointer;
  143. }
  144. .menu-bar {
  145. background: #ffffff;
  146. border: 1px solid #ccc;
  147. border-radius: 5px;
  148. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  149. padding: 0.5em;
  150. visibility: hidden;
  151. }
  152. .menu-bar button {
  153. display: block;
  154. width: 100%;
  155. margin-bottom: 0.5em;
  156. padding: 0.5em;
  157. background: #007bff;
  158. color: #fff;
  159. border: none;
  160. border-radius: 5px;
  161. cursor: pointer;
  162. }
  163. .menu-bar button:last-child {
  164. margin-bottom: 0;
  165. }
  166. .card-modal-group-box:hover .menu-bar {
  167. visibility: visible;
  168. }
  169. .modal-content input {
  170. width: 100%;
  171. padding: 0.5em;
  172. margin: 0.5em 0;
  173. border: 1px solid #ccc;
  174. border-radius: 5px;
  175. }
  176. .modal-buttons {
  177. display: flex;
  178. justify-content: space-between;
  179. margin-top: 1em;
  180. }
  181. /* 组内节点详情模态框样式 */
  182. .group-node-modal {
  183. position: fixed;
  184. top: 0;
  185. left: 0;
  186. width: 100%;
  187. height: 100%;
  188. display: none; /* 默认隐藏 */
  189. justify-content: center;
  190. align-items: center;
  191. background-color: rgba(0, 0, 0, 0.3); /* 柔和的半透明背景 */
  192. z-index: 9999;
  193. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  194. }
  195. .group-node-modal.active {
  196. display: flex; /* 显示模态框 */
  197. }
  198. .group-node-modal-container {
  199. background-color: #f9f9f9;
  200. padding: 20px;
  201. border-radius: 15px;
  202. width: 500px;
  203. max-width: 90%;
  204. max-height: 90%; /* 限制模态框的高度 */
  205. overflow-y: auto; /* 超出内容时启用滚动 */
  206. position: relative;
  207. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  208. }
  209. /* 关闭按钮样式 */
  210. .group-node-modal-close-button {
  211. position: absolute;
  212. top: 10px;
  213. right: 10px;
  214. background: none;
  215. border: none;
  216. font-size: 18px;
  217. color: #007aff;
  218. cursor: pointer;
  219. }
  220. /* 字段容器 */
  221. .group-node-modal-content p {
  222. background-color: #fff;
  223. padding: 10px;
  224. border-radius: 10px;
  225. border: 1px solid #e5e5ea;
  226. margin-bottom: 10px;
  227. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  228. font-size: 16px;
  229. color: #333;
  230. display: flex;
  231. flex-direction: column; /* 让标签和内容垂直排列 */
  232. word-break: break-word; /* 防止超长内容溢出,自动换行 */
  233. overflow-wrap: break-word; /* 长词自动换行 */
  234. }
  235. /* 标签与内容的分隔 */
  236. .group-node-modal-content p strong {
  237. color: #8e8e93;
  238. margin-bottom: 5px;
  239. }
  240. /* 模态框标题 */
  241. .group-node-modal-content h3 {
  242. margin-bottom: 15px;
  243. font-size: 20px;
  244. color: #333;
  245. font-weight: bold;
  246. text-align: center;
  247. }
  248. /* iOS 风格的按钮 */
  249. .group-node-modal-container button {
  250. background-color: #007aff;
  251. color: white;
  252. border: none;
  253. padding: 10px 15px;
  254. border-radius: 10px;
  255. font-size: 16px;
  256. cursor: pointer;
  257. margin-top: 15px;
  258. width: 100%;
  259. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  260. }
  261. .group-node-modal-container button:hover {
  262. background-color: #005dbb;
  263. }
  264. /* 超长文本处理 */
  265. .group-node-modal-content p {
  266. max-height: 80px; /* 限制每个字段的最大高度 */
  267. overflow: hidden;
  268. text-overflow: ellipsis; /* 超出内容时添加省略号 */
  269. white-space: nowrap; /* 禁止换行 */
  270. }
  271. .group-node-modal-content p:hover {
  272. white-space: normal; /* 当鼠标悬停时显示完整内容 */
  273. max-height: none; /* 取消高度限制 */
  274. overflow: visible; /* 显示完整文本 */
  275. }