index.less 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. @import '../../../../node_modules/antd/lib/style/themes/variable';
  2. @border: 1px dashed @border-color-base;
  3. @mask-color: rgba(#000, 0.35);
  4. @with: 160px;
  5. @height: 150px;
  6. .flex-center() {
  7. align-items: center;
  8. justify-content: center;
  9. }
  10. .upload-image-warp {
  11. display: flex;
  12. justify-content: flex-start;
  13. .upload-image-border {
  14. position: relative;
  15. width: @with;
  16. height: @height;
  17. overflow: hidden;
  18. //border-radius: 50%;
  19. border: @border;
  20. transition: all 0.3s;
  21. &:hover {
  22. border-color: @primary-color-hover;
  23. }
  24. .upload-image-content {
  25. .flex-center();
  26. position: relative;
  27. display: flex;
  28. flex-direction: column;
  29. width: @with;
  30. height: @height;
  31. background-color: rgba(#000, 0.06);
  32. cursor: pointer;
  33. .upload-image-mask {
  34. .flex-center();
  35. position: absolute;
  36. top: 0;
  37. left: 0;
  38. display: none;
  39. width: 100%;
  40. height: 100%;
  41. color: #fff;
  42. font-size: 16px;
  43. background-color: @mask-color;
  44. }
  45. .upload-image {
  46. width: 144px;
  47. height: 138px;
  48. //border-radius: 50%;
  49. background-repeat: no-repeat;
  50. background-position: center;
  51. background-size: cover;
  52. }
  53. &:hover .upload-image-mask {
  54. display: flex;
  55. }
  56. }
  57. }
  58. .upload-loading-mask {
  59. .flex-center();
  60. position: absolute;
  61. top: 0;
  62. left: 0;
  63. display: flex;
  64. width: 100%;
  65. height: 100%;
  66. color: #fff;
  67. background-color: @mask-color;
  68. }
  69. }