role.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. .role-info-cards-container {
  2. display: flex;
  3. flex-wrap: wrap;
  4. gap: 16px;
  5. justify-content: flex-start;
  6. padding: 20px;
  7. }
  8. .role-item {
  9. background-color: #ffffff;
  10. border-radius: 16px;
  11. padding: 20px;
  12. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  13. width: 280px;
  14. transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  15. position: relative;
  16. }
  17. .role-item:hover {
  18. transform: translateY(-4px);
  19. box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  20. }
  21. .role-info-create-role-button {
  22. background-color: #0a84ff;
  23. color: white;
  24. border: none;
  25. padding: 12px 24px;
  26. border-radius: 22px;
  27. cursor: pointer;
  28. font-size: 17px;
  29. font-weight: 600;
  30. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  31. transition: background-color 0.3s, transform 0.2s;
  32. margin: 20px;
  33. }
  34. .role-info-create-role-button:hover {
  35. background-color: #0051a8;
  36. transform: translateY(-2px);
  37. }
  38. /* 弹出菜单样式 */
  39. #role-action-menu {
  40. position: absolute;
  41. background-color: #ffffff;
  42. border: 1px solid #d1d1d6;
  43. border-radius: 12px;
  44. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  45. padding: 12px;
  46. z-index: 1000;
  47. width: 150px;
  48. }
  49. #role-action-menu button {
  50. width: 100%;
  51. padding: 10px;
  52. background-color: #0a84ff;
  53. color: white;
  54. border: none;
  55. border-radius: 10px;
  56. cursor: pointer;
  57. font-size: 15px;
  58. margin-bottom: 8px;
  59. transition: background-color 0.3s;
  60. }
  61. #role-action-menu button:last-child {
  62. margin-bottom: 0;
  63. }
  64. #role-action-menu button:hover {
  65. background-color: #0051a8;
  66. }
  67. /* 模态框内按钮 */
  68. .role-info-button {
  69. padding: 12px 24px;
  70. background-color: #34c759;
  71. color: white;
  72. border: none;
  73. border-radius: 12px;
  74. cursor: pointer;
  75. transition: background-color 0.3s, transform 0.2s;
  76. margin-bottom: 12px;
  77. font-size: 16px;
  78. font-weight: 500;
  79. }
  80. .role-info-button:hover {
  81. background-color: #28a745;
  82. transform: translateY(-2px);
  83. }
  84. .role-info-button-delete {
  85. background-color: #ff3b30;
  86. }
  87. .role-info-button-delete:hover {
  88. background-color: #c23321;
  89. }
  90. /* 创建角色模态框 */
  91. .CreateRoleModal-modal {
  92. display: none; /* 隐藏模态框 */
  93. position: fixed;
  94. z-index: 2000; /* 在最上层 */
  95. left: 0;
  96. top: 0;
  97. width: 100%; /* 100% 宽 */
  98. height: 100%; /* 100% 高 */
  99. overflow: auto; /* 如果需要滚动条 */
  100. background-color: rgba(0, 0, 0, 0.4); /* 半透明背景 */
  101. backdrop-filter: blur(5px); /* 背景模糊 */
  102. }
  103. .CreateRoleModal-modal-content {
  104. background-color: #ffffff;
  105. margin: 10% auto; /* 居中 */
  106. padding: 30px;
  107. border-radius: 20px;
  108. width: 90%;
  109. max-width: 500px;
  110. box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  111. position: relative;
  112. }
  113. .CreateRoleModal-close {
  114. color: #8e8e93;
  115. position: absolute;
  116. top: 20px;
  117. right: 20px;
  118. font-size: 24px;
  119. font-weight: bold;
  120. cursor: pointer;
  121. transition: color 0.3s;
  122. }
  123. .CreateRoleModal-close:hover,
  124. .CreateRoleModal-close:focus {
  125. color: #ff3b30;
  126. }
  127. /* 表单元素 */
  128. form label {
  129. display: block;
  130. margin-bottom: 8px;
  131. font-weight: 500;
  132. color: #3c3c43;
  133. }
  134. form input[type="text"] {
  135. width: 100%;
  136. padding: 10px 14px;
  137. margin-bottom: 16px;
  138. border: 1px solid #d1d1d6;
  139. border-radius: 12px;
  140. font-size: 16px;
  141. background-color: #f2f2f7;
  142. color: #1c1c1e;
  143. }
  144. form input[type="submit"],
  145. form button {
  146. background-color: #0a84ff;
  147. color: white;
  148. border: none;
  149. padding: 12px 24px;
  150. border-radius: 22px;
  151. cursor: pointer;
  152. font-size: 17px;
  153. font-weight: 600;
  154. transition: background-color 0.3s, transform 0.2s;
  155. }
  156. form input[type="submit"]:hover,
  157. form button:hover {
  158. background-color: #0051a8;
  159. transform: translateY(-2px);
  160. }
  161. /* 权限复选框容器 */
  162. #permissionsContainer div {
  163. margin-bottom: 12px;
  164. }
  165. #permissionsContainer label {
  166. margin-left: 8px;
  167. font-weight: 400;
  168. color: #3c3c43;
  169. }
  170. /* 子权限复选框容器 */
  171. .role-sub-permissions {
  172. margin-left: 20px;
  173. margin-top: 8px;
  174. }
  175. /* 禁用按钮样式 */
  176. .role-info-button-disabled {
  177. padding: 12px 24px;
  178. background-color: #c7c7cc;
  179. color: white;
  180. border: none;
  181. border-radius: 12px;
  182. cursor: not-allowed;
  183. font-size: 16px;
  184. text-align: center;
  185. }
  186. /* 置顶角色样式 */
  187. .top-role {
  188. border: 2px solid #0a84ff;
  189. }
  190. /* 响应式调整 */
  191. @media (max-width: 600px) {
  192. .role-info-cards-container {
  193. flex-direction: column;
  194. align-items: center;
  195. }
  196. .role-item {
  197. width: 90%;
  198. }
  199. .CreateRoleModal-modal-content {
  200. width: 95%;
  201. }
  202. }