| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /* make keyframes that tell the start state and the end state of our object */
- @-webkit-keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @-moz-keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- .fade-in {
- opacity: 0; /* make things invisible upon start */
- animation: fadeIn ease-in 1; /* call our keyframe named fadeIn, use animation ease-in and repeat it only 1 time */
- animation-fill-mode: forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1) */
- animation-duration: 0.5s;
- &.faster {
- animation-duration: 0.3s;
- }
- }
- /* page transition */
- .fade-enter {
- opacity: 0;
- }
- .fade-enter.fade-enter-active {
- opacity: 1;
- transition: opacity 500ms ease-in;
- }
- .fade-exit {
- opacity: 1;
- }
- .fade-exit.fade-exit-active {
- opacity: 0;
- transition: opacity 300ms ease-in;
- }
|