dropzone.css 12 KB

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