You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

446 lines
6.7 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*******************************
  2. Animations
  3. *******************************/
  4. /*--------------
  5. Emphasis
  6. ---------------*/
  7. .flash.transition {
  8. animation-name: flash;
  9. }
  10. .shake.transition {
  11. animation-name: shake;
  12. }
  13. .bounce.transition {
  14. animation-name: bounce;
  15. }
  16. .tada.transition {
  17. animation-name: tada;
  18. }
  19. /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
  20. .pulse.transition {
  21. animation-name: pulse;
  22. }
  23. /* Flash */
  24. @keyframes flash {
  25. 0%, 50%, 100% {
  26. opacity: 1;
  27. }
  28. 25%, 75% {
  29. opacity: 0;
  30. }
  31. }
  32. /* Shake */
  33. @keyframes shake {
  34. 0%, 100% {
  35. transform: translateX(0);
  36. }
  37. 10%, 30%, 50%, 70%, 90% {
  38. transform: translateX(-10px);
  39. }
  40. 20%, 40%, 60%, 80% {
  41. transform: translateX(10px);
  42. }
  43. }
  44. /* Bounce */
  45. @keyframes bounce {
  46. 0%, 20%, 50%, 80%, 100% {
  47. transform: translateY(0);
  48. }
  49. 40% {
  50. transform: translateY(-30px);
  51. }
  52. 60% {
  53. transform: translateY(-15px);
  54. }
  55. }
  56. /* Tada */
  57. @keyframes tada {
  58. 0% {
  59. transform: scale(1);
  60. }
  61. 10%, 20% {
  62. transform: scale(0.9) rotate(-3deg);
  63. }
  64. 30%, 50%, 70%, 90% {
  65. transform: scale(1.1) rotate(3deg);
  66. }
  67. 40%, 60%, 80% {
  68. transform: scale(1.1) rotate(-3deg);
  69. }
  70. 100% {
  71. transform: scale(1) rotate(0);
  72. }
  73. }
  74. /* Pulse */
  75. @keyframes pulse {
  76. 0% {
  77. transform: scale(1);
  78. opacity: 1;
  79. }
  80. 50% {
  81. transform: scale(0.9);
  82. opacity: 0.7;
  83. }
  84. 100% {
  85. transform: scale(1);
  86. opacity: 1;
  87. }
  88. }
  89. /*--------------
  90. Slide
  91. ---------------*/
  92. .slide.down.transition.in {
  93. animation-name: slide;
  94. transform-origin: 50% 0%;
  95. -ms-transform-origin: 50% 0%;
  96. -webkit-transform-origin: 50% 0%;
  97. }
  98. .slide.down.transition.out {
  99. animation-name: slideOut;
  100. transform-origin: 50% 0%;
  101. }
  102. .slide.up.transition.in {
  103. animation-name: slide;
  104. transform-origin: 50% 100%;
  105. }
  106. .slide.up.transition.out {
  107. animation-name: slideOut;
  108. transform-origin: 50% 100%;
  109. }
  110. @keyframes slide {
  111. 0% {
  112. opacity: 0;
  113. transform: scaleY(0);
  114. }
  115. 100% {
  116. opacity: 1;
  117. transform: scaleY(1);
  118. }
  119. }
  120. @keyframes slideOut {
  121. 0% {
  122. opacity: 1;
  123. transform: scaleY(1);
  124. }
  125. 100% {
  126. opacity: 0;
  127. transform: scaleY(0);
  128. }
  129. }
  130. /*--------------
  131. Flips
  132. ---------------*/
  133. .flip.transition.in,
  134. .flip.transition.out {
  135. perspective: 2000px;
  136. }
  137. .horizontal.flip.transition.in,
  138. .horizontal.flip.transition.out {
  139. animation-name: horizontalFlip;
  140. }
  141. .horizontal.flip.transition.out {
  142. animation-name: horizontalFlipOut;
  143. }
  144. .vertical.flip.transition.in,
  145. .vertical.flip.transition.out {
  146. animation-name: verticalFlip;
  147. }
  148. .vertical.flip.transition.out {
  149. animation-name: verticalFlipOut;
  150. }
  151. /* Horizontal */
  152. @keyframes horizontalFlip {
  153. 0% {
  154. transform: rotateY(-90deg);
  155. opacity: 0;
  156. }
  157. 100% {
  158. transform: rotateY(0deg);
  159. opacity: 1;
  160. }
  161. }
  162. /* Horizontal */
  163. @keyframes horizontalFlipOut {
  164. 0% {
  165. transform: rotateY(0deg);
  166. opacity: 1;
  167. }
  168. 100% {
  169. transform: rotateY(90deg);
  170. opacity: 0;
  171. }
  172. }
  173. /* Vertical */
  174. @keyframes verticalFlip {
  175. 0% {
  176. transform: rotateX(-90deg);
  177. opacity: 0;
  178. }
  179. 100% {
  180. transform: rotateX(0deg);
  181. opacity: 1;
  182. }
  183. }
  184. @keyframes verticalFlipOut {
  185. 0% {
  186. transform: rotateX(0deg);
  187. opacity: 1;
  188. }
  189. 100% {
  190. transform: rotateX(-90deg);
  191. opacity: 0;
  192. }
  193. }
  194. /*--------------
  195. Fades
  196. ---------------*/
  197. .fade.transition.in {
  198. animation-name: fade;
  199. }
  200. .fade.transition.out {
  201. animation-name: fadeOut;
  202. }
  203. .fade.up.transition.in {
  204. animation-name: fadeUp;
  205. }
  206. .fade.up.transition.out {
  207. animation-name: fadeUpOut;
  208. }
  209. .fade.down.transition.in {
  210. animation-name: fadeDown;
  211. }
  212. .fade.down.transition.out {
  213. animation-name: fadeDownOut;
  214. }
  215. /* Fade */
  216. @keyframes fade {
  217. 0% {
  218. opacity: 0;
  219. }
  220. 100% {
  221. opacity: 1;
  222. }
  223. }
  224. @keyframes fadeOut {
  225. 0% {
  226. opacity: 1;
  227. }
  228. 100% {
  229. opacity: 0;
  230. }
  231. }
  232. /* Fade Up */
  233. @keyframes fadeUp {
  234. 0% {
  235. opacity: 0;
  236. transform: translateY(10%);
  237. }
  238. 100% {
  239. opacity: 1;
  240. transform: translateY(0%);
  241. }
  242. }
  243. @keyframes fadeUpOut {
  244. 0% {
  245. opacity: 1;
  246. transform: translateY(0%);
  247. }
  248. 100% {
  249. opacity: 0;
  250. transform: translateY(10%);
  251. }
  252. }
  253. /* Fade Down */
  254. @keyframes fadeDown {
  255. 0% {
  256. opacity: 0;
  257. transform: translateY(-10%);
  258. }
  259. 100% {
  260. opacity: 1;
  261. transform: translateY(0%);
  262. }
  263. }
  264. @keyframes fadeDownOut {
  265. 0% {
  266. opacity: 1;
  267. transform: translateY(0%);
  268. }
  269. 100% {
  270. opacity: 0;
  271. transform: translateY(-10%);
  272. }
  273. }
  274. /*--------------
  275. Scale
  276. ---------------*/
  277. .scale.transition.in {
  278. animation-name: scale;
  279. }
  280. .scale.transition.out {
  281. animation-name: scaleOut;
  282. }
  283. /* Scale */
  284. @keyframes scale {
  285. 0% {
  286. opacity: 0;
  287. transform: scale(0.7);
  288. }
  289. 100% {
  290. opacity: 1;
  291. transform: scale(1);
  292. }
  293. }
  294. @keyframes scaleOut {
  295. 0% {
  296. opacity: 1;
  297. transform: scale(1);
  298. }
  299. 100% {
  300. opacity: 0;
  301. transform: scale(0.7);
  302. }
  303. }
  304. /*--------------
  305. Drop
  306. ---------------*/
  307. .drop.transition {
  308. transform-origin: top center;
  309. animation-timing-function: cubic-bezier(0.34, 1.61, 0.7, 1);
  310. }
  311. .drop.transition.in {
  312. animation-name: dropIn;
  313. }
  314. .drop.transition.out {
  315. animation-name: dropOut;
  316. }
  317. /* Scale */
  318. @keyframes dropIn {
  319. 0% {
  320. opacity: 0;
  321. transform: scale(0);
  322. }
  323. 100% {
  324. opacity: 1;
  325. transform: scale(1);
  326. }
  327. }
  328. @keyframes dropOut {
  329. 0% {
  330. opacity: 1;
  331. transform: scale(1);
  332. }
  333. 100% {
  334. opacity: 0;
  335. transform: scale(0);
  336. }
  337. }
  338. /*--------------
  339. Browse
  340. ---------------*/
  341. .browse.transition.in {
  342. animation-name: browseIn;
  343. animation-timing-function: ease;
  344. }
  345. .browse.transition.out,
  346. .browse.transition.out.left {
  347. animation-name: browseOutLeft;
  348. animation-timing-function: ease;
  349. }
  350. .browse.transition.out.right {
  351. animation-name: browseOutRight;
  352. animation-timing-function: ease;
  353. }
  354. @keyframes browseIn {
  355. 0% {
  356. transform: scale(0.8) translateZ(0px);
  357. z-index: -1;
  358. }
  359. 10% {
  360. transform: scale(0.8) translateZ(0px);
  361. z-index: -1;
  362. opacity: 0.7;
  363. }
  364. 80% {
  365. transform: scale(1.05) translateZ(0px);
  366. opacity: 1;
  367. z-index: 999;
  368. }
  369. 100% {
  370. transform: scale(1) translateZ(0px);
  371. z-index: 999;
  372. }
  373. }
  374. @keyframes browseOutLeft {
  375. 0% {
  376. z-index: 999;
  377. transform: translateX(0%) rotateY(0deg) rotateX(0deg);
  378. }
  379. 50% {
  380. z-index: -1;
  381. transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
  382. }
  383. 80% {
  384. opacity: 1;
  385. }
  386. 100% {
  387. z-index: -1;
  388. transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
  389. opacity: 0;
  390. }
  391. }
  392. @keyframes browseOutRight {
  393. 0% {
  394. z-index: 999;
  395. transform: translateX(0%) rotateY(0deg) rotateX(0deg);
  396. }
  397. 50% {
  398. z-index: 1;
  399. transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
  400. }
  401. 80% {
  402. opacity: 1;
  403. }
  404. 100% {
  405. z-index: 1;
  406. transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
  407. opacity: 0;
  408. }
  409. }