cropper.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. .cl-cropper__wrap {
  2. position: fixed;
  3. left: 0;
  4. bottom: 0;
  5. height: 100%;
  6. width: 100%;
  7. z-index: 99;
  8. .cl-cropper {
  9. height: 100%;
  10. &__container {
  11. height: 100%;
  12. position: relative;
  13. }
  14. &__view {
  15. position: absolute;
  16. left: 0;
  17. top: 0;
  18. right: 0;
  19. bottom: 0;
  20. margin: auto;
  21. z-index: 999;
  22. box-shadow: 0 0 1px 1px #fff;
  23. overflow: hidden;
  24. pointer-events: none;
  25. image {
  26. display: block;
  27. z-index: 1;
  28. }
  29. &.is-round {
  30. border-radius: 100%;
  31. }
  32. }
  33. &__image {
  34. position: absolute;
  35. &.is-filter-blur {
  36. filter: blur(20rpx);
  37. }
  38. image {
  39. display: block;
  40. height: 100%;
  41. width: 100%;
  42. }
  43. }
  44. &__tools {
  45. height: 80rpx;
  46. width: 100%;
  47. background-color: rgba(0, 0, 0, 0.2);
  48. position: absolute;
  49. /* #ifdef H5 */
  50. top: 44px;
  51. /* #endif */
  52. /* #ifndef H5 */
  53. top: 0;
  54. /* #endif */
  55. z-index: 9;
  56. &-item {
  57. display: inline-flex;
  58. align-items: center;
  59. justify-content: center;
  60. height: 80rpx;
  61. margin: 0 20rpx;
  62. text {
  63. color: #fff;
  64. &:last-child {
  65. font-size: 24rpx;
  66. margin-left: 10rpx;
  67. }
  68. }
  69. }
  70. }
  71. &__footer {
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. width: 100%;
  76. padding-bottom: env(safe-area-inset-bottom);
  77. position: absolute;
  78. bottom: 50rpx;
  79. left: 0;
  80. button {
  81. background-color: transparent;
  82. color: #fff;
  83. font-size: 30rpx;
  84. font-weight: 500;
  85. border-width: 0;
  86. margin: 0 auto;
  87. &::after {
  88. border-width: 0;
  89. }
  90. }
  91. }
  92. &__mask {
  93. position: absolute;
  94. left: 0;
  95. top: 0;
  96. height: 100%;
  97. width: 100%;
  98. background-color: rgba(0, 0, 0, 0.6);
  99. pointer-events: none;
  100. }
  101. }
  102. .cl-cropper__canvas {
  103. position: absolute;
  104. top: -1000px;
  105. left: -1000px;
  106. z-index: 0;
  107. }
  108. }