dropzone.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. /* The MIT License */
  2. .dropzone,
  3. .dropzone *,
  4. .dropzone-previews,
  5. .dropzone-previews * {
  6. -webkit-box-sizing: border-box;
  7. -moz-box-sizing: border-box;
  8. box-sizing: border-box;
  9. }
  10. .dropzone {
  11. position: relative;
  12. border: 1px solid rgba(0,0,0,0.08);
  13. background: rgba(0,0,0,0.02);
  14. padding: 1em;
  15. }
  16. .dropzone.dz-clickable {
  17. cursor: pointer;
  18. }
  19. .dropzone.dz-clickable .dz-message,
  20. .dropzone.dz-clickable .dz-message span {
  21. cursor: pointer;
  22. }
  23. .dropzone.dz-clickable * {
  24. cursor: default;
  25. }
  26. .dropzone .dz-message {
  27. opacity: 1;
  28. -ms-filter: none;
  29. filter: none;
  30. }
  31. .dropzone.dz-drag-hover {
  32. border-color: rgba(0,0,0,0.15);
  33. background: rgba(0,0,0,0.04);
  34. }
  35. .dropzone.dz-started .dz-message {
  36. display: none;
  37. }
  38. .dropzone .dz-preview,
  39. .dropzone-previews .dz-preview {
  40. background: rgba(255,255,255,0.8);
  41. position: relative;
  42. display: inline-block;
  43. margin: 17px;
  44. vertical-align: top;
  45. border: 1px solid #acacac;
  46. padding: 6px 6px 6px 6px;
  47. }
  48. .dropzone .dz-preview.dz-file-preview [data-dz-thumbnail],
  49. .dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
  50. display: none;
  51. }
  52. .dropzone .dz-preview .dz-details,
  53. .dropzone-previews .dz-preview .dz-details {
  54. width: 100px;
  55. height: 100px;
  56. position: relative;
  57. background: #ebebeb;
  58. padding: 5px;
  59. margin-bottom: 22px;
  60. }
  61. .dropzone .dz-preview .dz-details .dz-filename,
  62. .dropzone-previews .dz-preview .dz-details .dz-filename {
  63. overflow: hidden;
  64. height: 100%;
  65. }
  66. .dropzone .dz-preview .dz-details img,
  67. .dropzone-previews .dz-preview .dz-details img {
  68. position: absolute;
  69. top: 0;
  70. left: 0;
  71. width: 100px;
  72. height: 100px;
  73. }
  74. .dropzone .dz-preview .dz-details .dz-size,
  75. .dropzone-previews .dz-preview .dz-details .dz-size {
  76. position: absolute;
  77. bottom: -28px;
  78. left: 3px;
  79. height: 28px;
  80. line-height: 28px;
  81. }
  82. .dropzone .dz-preview.dz-error .dz-error-mark,
  83. .dropzone-previews .dz-preview.dz-error .dz-error-mark {
  84. display: block;
  85. }
  86. .dropzone .dz-preview.dz-success .dz-success-mark,
  87. .dropzone-previews .dz-preview.dz-success .dz-success-mark {
  88. display: block;
  89. }
  90. .dropzone .dz-preview:hover .dz-details img,
  91. .dropzone-previews .dz-preview:hover .dz-details img {
  92. display: none;
  93. }
  94. .dropzone .dz-preview .dz-success-mark,
  95. .dropzone-previews .dz-preview .dz-success-mark,
  96. .dropzone .dz-preview .dz-error-mark,
  97. .dropzone-previews .dz-preview .dz-error-mark {
  98. display: none;
  99. position: absolute;
  100. width: 40px;
  101. height: 40px;
  102. font-size: 30px;
  103. text-align: center;
  104. right: -10px;
  105. top: -10px;
  106. }
  107. .dropzone .dz-preview .dz-success-mark,
  108. .dropzone-previews .dz-preview .dz-success-mark {
  109. color: #8cc657;
  110. }
  111. .dropzone .dz-preview .dz-error-mark,
  112. .dropzone-previews .dz-preview .dz-error-mark {
  113. color: #ee162d;
  114. }
  115. .dropzone .dz-preview .dz-progress,
  116. .dropzone-previews .dz-preview .dz-progress {
  117. position: absolute;
  118. top: 100px;
  119. left: 6px;
  120. right: 6px;
  121. height: 6px;
  122. background: #d7d7d7;
  123. display: none;
  124. }
  125. .dropzone .dz-preview .dz-progress .dz-upload,
  126. .dropzone-previews .dz-preview .dz-progress .dz-upload {
  127. display: block;
  128. position: absolute;
  129. top: 0;
  130. bottom: 0;
  131. left: 0;
  132. width: 0%;
  133. background-color: #8cc657;
  134. }
  135. .dropzone .dz-preview.dz-processing .dz-progress,
  136. .dropzone-previews .dz-preview.dz-processing .dz-progress {
  137. display: block;
  138. }
  139. .dropzone .dz-preview .dz-error-message,
  140. .dropzone-previews .dz-preview .dz-error-message {
  141. display: none;
  142. position: absolute;
  143. top: -5px;
  144. left: -20px;
  145. background: rgba(245,245,245,0.8);
  146. padding: 8px 10px;
  147. color: #800;
  148. min-width: 140px;
  149. max-width: 500px;
  150. z-index: 500;
  151. }
  152. .dropzone .dz-preview:hover.dz-error .dz-error-message,
  153. .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
  154. display: block;
  155. }
  156. .dropzone {
  157. border: 1px solid rgba(0,0,0,0.03);
  158. min-height: 360px;
  159. -webkit-border-radius: 3px;
  160. border-radius: 3px;
  161. background: rgba(0,0,0,0.03);
  162. padding: 23px;
  163. }
  164. .dropzone .dz-default.dz-message {
  165. opacity: 1;
  166. -ms-filter: none;
  167. filter: none;
  168. -webkit-transition: opacity 0.3s ease-in-out;
  169. -moz-transition: opacity 0.3s ease-in-out;
  170. -o-transition: opacity 0.3s ease-in-out;
  171. -ms-transition: opacity 0.3s ease-in-out;
  172. transition: opacity 0.3s ease-in-out;
  173. background-image: url("../images/spritemap.png");
  174. background-repeat: no-repeat;
  175. background-position: 0 0;
  176. position: absolute;
  177. width: 428px;
  178. height: 123px;
  179. margin-left: -214px;
  180. margin-top: -61.5px;
  181. top: 50%;
  182. left: 50%;
  183. }
  184. @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
  185. .dropzone .dz-default.dz-message {
  186. background-image: url("../images/spritemap@2x.png");
  187. -webkit-background-size: 428px 406px;
  188. -moz-background-size: 428px 406px;
  189. background-size: 428px 406px;
  190. }
  191. }
  192. .dropzone .dz-default.dz-message span {
  193. display: none;
  194. }
  195. .dropzone.dz-square .dz-default.dz-message {
  196. background-position: 0 -123px;
  197. width: 268px;
  198. margin-left: -134px;
  199. height: 174px;
  200. margin-top: -87px;
  201. }
  202. .dropzone.dz-drag-hover .dz-message {
  203. opacity: 0.15;
  204. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=15)";
  205. filter: alpha(opacity=15);
  206. }
  207. .dropzone.dz-started .dz-message {
  208. display: block;
  209. opacity: 0;
  210. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  211. filter: alpha(opacity=0);
  212. }
  213. .dropzone .dz-preview,
  214. .dropzone-previews .dz-preview {
  215. -webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
  216. box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
  217. font-size: 14px;
  218. }
  219. .dropzone .dz-preview.dz-image-preview:hover .dz-details img,
  220. .dropzone-previews .dz-preview.dz-image-preview:hover .dz-details img {
  221. display: block;
  222. opacity: 0.1;
  223. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
  224. filter: alpha(opacity=10);
  225. }
  226. .dropzone .dz-preview.dz-success .dz-success-mark,
  227. .dropzone-previews .dz-preview.dz-success .dz-success-mark {
  228. opacity: 1;
  229. -ms-filter: none;
  230. filter: none;
  231. }
  232. .dropzone .dz-preview.dz-error .dz-error-mark,
  233. .dropzone-previews .dz-preview.dz-error .dz-error-mark {
  234. opacity: 1;
  235. -ms-filter: none;
  236. filter: none;
  237. }
  238. .dropzone .dz-preview.dz-error .dz-progress .dz-upload,
  239. .dropzone-previews .dz-preview.dz-error .dz-progress .dz-upload {
  240. background: #ee1e2d;
  241. }
  242. .dropzone .dz-preview .dz-error-mark,
  243. .dropzone-previews .dz-preview .dz-error-mark,
  244. .dropzone .dz-preview .dz-success-mark,
  245. .dropzone-previews .dz-preview .dz-success-mark {
  246. display: block;
  247. opacity: 0;
  248. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  249. filter: alpha(opacity=0);
  250. -webkit-transition: opacity 0.4s ease-in-out;
  251. -moz-transition: opacity 0.4s ease-in-out;
  252. -o-transition: opacity 0.4s ease-in-out;
  253. -ms-transition: opacity 0.4s ease-in-out;
  254. transition: opacity 0.4s ease-in-out;
  255. background-image: url("../images/spritemap.png");
  256. background-repeat: no-repeat;
  257. }
  258. @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
  259. .dropzone .dz-preview .dz-error-mark,
  260. .dropzone-previews .dz-preview .dz-error-mark,
  261. .dropzone .dz-preview .dz-success-mark,
  262. .dropzone-previews .dz-preview .dz-success-mark {
  263. background-image: url("../images/spritemap@2x.png");
  264. -webkit-background-size: 428px 406px;
  265. -moz-background-size: 428px 406px;
  266. background-size: 428px 406px;
  267. }
  268. }
  269. .dropzone .dz-preview .dz-error-mark span,
  270. .dropzone-previews .dz-preview .dz-error-mark span,
  271. .dropzone .dz-preview .dz-success-mark span,
  272. .dropzone-previews .dz-preview .dz-success-mark span {
  273. display: none;
  274. }
  275. .dropzone .dz-preview .dz-error-mark,
  276. .dropzone-previews .dz-preview .dz-error-mark {
  277. background-position: -268px -123px;
  278. }
  279. .dropzone .dz-preview .dz-success-mark,
  280. .dropzone-previews .dz-preview .dz-success-mark {
  281. background-position: -268px -163px;
  282. }
  283. .dropzone .dz-preview .dz-progress .dz-upload,
  284. .dropzone-previews .dz-preview .dz-progress .dz-upload {
  285. -webkit-animation: loading 0.4s linear infinite;
  286. -moz-animation: loading 0.4s linear infinite;
  287. -o-animation: loading 0.4s linear infinite;
  288. -ms-animation: loading 0.4s linear infinite;
  289. animation: loading 0.4s linear infinite;
  290. -webkit-transition: width 0.3s ease-in-out;
  291. -moz-transition: width 0.3s ease-in-out;
  292. -o-transition: width 0.3s ease-in-out;
  293. -ms-transition: width 0.3s ease-in-out;
  294. transition: width 0.3s ease-in-out;
  295. -webkit-border-radius: 2px;
  296. border-radius: 2px;
  297. position: absolute;
  298. top: 0;
  299. left: 0;
  300. width: 0%;
  301. height: 100%;
  302. background-image: url("../images/spritemap.png");
  303. background-repeat: repeat-x;
  304. background-position: 0px -400px;
  305. }
  306. @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
  307. .dropzone .dz-preview .dz-progress .dz-upload,
  308. .dropzone-previews .dz-preview .dz-progress .dz-upload {
  309. background-image: url("../images/spritemap@2x.png");
  310. -webkit-background-size: 428px 406px;
  311. -moz-background-size: 428px 406px;
  312. background-size: 428px 406px;
  313. }
  314. }
  315. .dropzone .dz-preview.dz-success .dz-progress,
  316. .dropzone-previews .dz-preview.dz-success .dz-progress {
  317. display: block;
  318. opacity: 0;
  319. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  320. filter: alpha(opacity=0);
  321. -webkit-transition: opacity 0.4s ease-in-out;
  322. -moz-transition: opacity 0.4s ease-in-out;
  323. -o-transition: opacity 0.4s ease-in-out;
  324. -ms-transition: opacity 0.4s ease-in-out;
  325. transition: opacity 0.4s ease-in-out;
  326. }
  327. .dropzone .dz-preview .dz-error-message,
  328. .dropzone-previews .dz-preview .dz-error-message {
  329. display: block;
  330. opacity: 0;
  331. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  332. filter: alpha(opacity=0);
  333. -webkit-transition: opacity 0.3s ease-in-out;
  334. -moz-transition: opacity 0.3s ease-in-out;
  335. -o-transition: opacity 0.3s ease-in-out;
  336. -ms-transition: opacity 0.3s ease-in-out;
  337. transition: opacity 0.3s ease-in-out;
  338. }
  339. .dropzone .dz-preview:hover.dz-error .dz-error-message,
  340. .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
  341. opacity: 1;
  342. -ms-filter: none;
  343. filter: none;
  344. }
  345. .dropzone a.dz-remove,
  346. .dropzone-previews a.dz-remove {
  347. background-image: -webkit-linear-gradient(top, #fafafa, #eee);
  348. background-image: -moz-linear-gradient(top, #fafafa, #eee);
  349. background-image: -o-linear-gradient(top, #fafafa, #eee);
  350. background-image: -ms-linear-gradient(top, #fafafa, #eee);
  351. background-image: linear-gradient(to bottom, #fafafa, #eee);
  352. -webkit-border-radius: 2px;
  353. border-radius: 2px;
  354. border: 1px solid #eee;
  355. text-decoration: none;
  356. display: block;
  357. padding: 4px 5px;
  358. text-align: center;
  359. color: #aaa;
  360. margin-top: 26px;
  361. }
  362. .dropzone a.dz-remove:hover,
  363. .dropzone-previews a.dz-remove:hover {
  364. color: #666;
  365. }
  366. @-moz-keyframes loading {
  367. 0% {
  368. background-position: 0 -400px;
  369. }
  370. 100% {
  371. background-position: -7px -400px;
  372. }
  373. }
  374. @-webkit-keyframes loading {
  375. 0% {
  376. background-position: 0 -400px;
  377. }
  378. 100% {
  379. background-position: -7px -400px;
  380. }
  381. }
  382. @-o-keyframes loading {
  383. 0% {
  384. background-position: 0 -400px;
  385. }
  386. 100% {
  387. background-position: -7px -400px;
  388. }
  389. }
  390. @-ms-keyframes loading {
  391. 0% {
  392. background-position: 0 -400px;
  393. }
  394. 100% {
  395. background-position: -7px -400px;
  396. }
  397. }
  398. @keyframes loading {
  399. 0% {
  400. background-position: 0 -400px;
  401. }
  402. 100% {
  403. background-position: -7px -400px;
  404. }
  405. }