welCropper.wxss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. .cropper_main_container {
  2. position: absolute;
  3. left: 0;
  4. top: 0;
  5. z-index: 100;
  6. width: 750rpx;
  7. height: 100vh;
  8. background: #555;
  9. overflow: hidden;
  10. }
  11. .cropper_main_container.hidden {
  12. display: none;
  13. }
  14. .cropper_container {
  15. position: absolute;
  16. left: 0;
  17. top: 0;
  18. display: flex;
  19. align-items: center;
  20. justify-content:center;
  21. }
  22. /* button */
  23. .cropper_toolbar {
  24. position: absolute;
  25. z-index: 100;
  26. bottom: 0;
  27. height: 50px;
  28. background: black;
  29. width: 100%;
  30. line-height: 50px;
  31. font-size: 15px;
  32. text-align: center;
  33. color: white;
  34. }
  35. .cropper_toolbar .button_item {
  36. /* width: 70px; */
  37. float: left;
  38. /* width: 20%; */
  39. width: 25%;
  40. height: 50px;
  41. }
  42. .original_button .check_container {
  43. position: relative;
  44. float: left;
  45. margin-top: 14px;
  46. width: 18px;
  47. height: 18px;
  48. border: 1px solid white;
  49. }
  50. .original_button.checked {
  51. background: #26ab28;
  52. }
  53. /* crop_image_button */
  54. .crop_image_button {
  55. color: #26ab28;
  56. }
  57. .crop_image_button.disable {
  58. /* color: #038905; */
  59. color: rgba(0, 0, 0, 0);
  60. }
  61. /* canvas */
  62. .cropper_movable_area_container {
  63. position: relative;
  64. /* background: salmon;
  65. border: 2px solid red; */
  66. }
  67. .cropper_canvas_container_item {
  68. position: absolute;
  69. left: 0;
  70. top: 0;
  71. width: 100%;
  72. height: 100%;
  73. }
  74. .cropper_canvas_container {
  75. position: relative;
  76. }
  77. /* opacity:0隐藏,如果想看就设置为1,只能在测试机能看到,真机上canvas层级在最高层 */
  78. .cropper_movable_area_container .main_move_item {
  79. z-index: 100;
  80. opacity: 0.7;
  81. /* opacity: 0; */
  82. background: white;
  83. border-radius: 50%;
  84. }
  85. .cropper_canvas_container .canvas {
  86. position: absolute;
  87. left: 0;
  88. top: 0;
  89. /* opacity: 0; */
  90. }
  91. /* 因为display:none在真机上会造成无法截取图片,所以这里是通过移到显示区域外来达到隐藏效果的 */
  92. .original_canvas {
  93. position: absolute;
  94. left: 750rpx;
  95. top: 100vh;
  96. }
  97. .scale-image {
  98. position: absolute;
  99. left: 0;
  100. top: 0;
  101. }
  102. .move_canvas {
  103. /* border: 2px solid blue; */
  104. /* background: red; */
  105. }