cropper.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. .cropper-container {
  2. direction: ltr;
  3. font-size: 0;
  4. line-height: 0;
  5. position: relative;
  6. touch-action: none;
  7. user-select: none;
  8. & img {
  9. display: block;
  10. height: 100%;
  11. image-orientation: 0deg;
  12. max-height: none !important;
  13. max-width: none !important;
  14. min-height: 0 !important;
  15. min-width: 0 !important;
  16. width: 100%;
  17. }
  18. }
  19. .cropper-wrap-box,
  20. .cropper-canvas,
  21. .cropper-drag-box,
  22. .cropper-crop-box,
  23. .cropper-modal {
  24. bottom: 0;
  25. left: 0;
  26. position: absolute;
  27. right: 0;
  28. top: 0;
  29. }
  30. .cropper-wrap-box,
  31. .cropper-canvas {
  32. overflow: hidden;
  33. }
  34. .cropper-drag-box {
  35. background-color: #fff;
  36. opacity: 0;
  37. }
  38. .cropper-modal {
  39. background-color: #000;
  40. opacity: 0.5;
  41. }
  42. .cropper-view-box {
  43. display: block;
  44. height: 100%;
  45. outline: 1px solid #39f;
  46. outline-color: rgba(51, 153, 255, 0.75);
  47. overflow: hidden;
  48. width: 100%;
  49. }
  50. .cropper-dashed {
  51. border: 0 dashed #eee;
  52. display: block;
  53. opacity: 0.5;
  54. position: absolute;
  55. &.dashed-h {
  56. border-bottom-width: 1px;
  57. border-top-width: 1px;
  58. height: calc(100% / 3);
  59. left: 0;
  60. top: calc(100% / 3);
  61. width: 100%;
  62. }
  63. &.dashed-v {
  64. border-left-width: 1px;
  65. border-right-width: 1px;
  66. height: 100%;
  67. left: calc(100% / 3);
  68. top: 0;
  69. width: calc(100% / 3);
  70. }
  71. }
  72. .cropper-center {
  73. display: block;
  74. height: 0;
  75. left: 50%;
  76. opacity: 0.75;
  77. position: absolute;
  78. top: 50%;
  79. width: 0;
  80. &::before,
  81. &::after {
  82. background-color: #eee;
  83. content: ' ';
  84. display: block;
  85. position: absolute;
  86. }
  87. &::before {
  88. height: 1px;
  89. left: -3px;
  90. top: 0;
  91. width: 7px;
  92. }
  93. &::after {
  94. height: 7px;
  95. left: 0;
  96. top: -3px;
  97. width: 1px;
  98. }
  99. }
  100. .cropper-face,
  101. .cropper-line,
  102. .cropper-point {
  103. display: block;
  104. height: 100%;
  105. opacity: 0.1;
  106. position: absolute;
  107. width: 100%;
  108. }
  109. .cropper-face {
  110. background-color: #fff;
  111. left: 0;
  112. top: 0;
  113. }
  114. .cropper-line {
  115. background-color: #39f;
  116. &.line-e {
  117. cursor: ew-resize;
  118. right: -3px;
  119. top: 0;
  120. width: 5px;
  121. }
  122. &.line-n {
  123. cursor: ns-resize;
  124. height: 5px;
  125. left: 0;
  126. top: -3px;
  127. }
  128. &.line-w {
  129. cursor: ew-resize;
  130. left: -3px;
  131. top: 0;
  132. width: 5px;
  133. }
  134. &.line-s {
  135. bottom: -3px;
  136. cursor: ns-resize;
  137. height: 5px;
  138. left: 0;
  139. }
  140. }
  141. .cropper-point {
  142. background-color: #39f;
  143. height: 5px;
  144. opacity: 0.75;
  145. width: 5px;
  146. &.point-e {
  147. cursor: ew-resize;
  148. margin-top: -3px;
  149. right: -3px;
  150. top: 50%;
  151. }
  152. &.point-n {
  153. cursor: ns-resize;
  154. left: 50%;
  155. margin-left: -3px;
  156. top: -3px;
  157. }
  158. &.point-w {
  159. cursor: ew-resize;
  160. left: -3px;
  161. margin-top: -3px;
  162. top: 50%;
  163. }
  164. &.point-s {
  165. bottom: -3px;
  166. cursor: s-resize;
  167. left: 50%;
  168. margin-left: -3px;
  169. }
  170. &.point-ne {
  171. cursor: nesw-resize;
  172. right: -3px;
  173. top: -3px;
  174. }
  175. &.point-nw {
  176. cursor: nwse-resize;
  177. left: -3px;
  178. top: -3px;
  179. }
  180. &.point-sw {
  181. bottom: -3px;
  182. cursor: nesw-resize;
  183. left: -3px;
  184. }
  185. &.point-se {
  186. bottom: -3px;
  187. cursor: nwse-resize;
  188. height: 20px;
  189. opacity: 1;
  190. right: -3px;
  191. width: 20px;
  192. @media (min-width: 768px) {
  193. height: 15px;
  194. width: 15px;
  195. }
  196. @media (min-width: 992px) {
  197. height: 10px;
  198. width: 10px;
  199. }
  200. @media (min-width: 1200px) {
  201. height: 5px;
  202. opacity: 0.75;
  203. width: 5px;
  204. }
  205. }
  206. &.point-se::before {
  207. background-color: #39f;
  208. bottom: -50%;
  209. content: ' ';
  210. display: block;
  211. height: 200%;
  212. opacity: 0;
  213. position: absolute;
  214. right: -50%;
  215. width: 200%;
  216. }
  217. }
  218. .cropper-invisible {
  219. opacity: 0;
  220. }
  221. .cropper-bg {
  222. background-image: url('../images/bg.png');
  223. }
  224. .cropper-hide {
  225. display: block;
  226. height: 0;
  227. position: absolute;
  228. width: 0;
  229. }
  230. .cropper-hidden {
  231. display: none !important;
  232. }
  233. .cropper-move {
  234. cursor: move;
  235. }
  236. .cropper-crop {
  237. cursor: crosshair;
  238. }
  239. .cropper-disabled .cropper-drag-box,
  240. .cropper-disabled .cropper-face,
  241. .cropper-disabled .cropper-line,
  242. .cropper-disabled .cropper-point {
  243. cursor: not-allowed;
  244. }