|
| 1 | +/** |
| 2 | + * Book |
| 3 | + * |
| 4 | + * @author jh3y - jheytompkins.com |
| 5 | +*/ |
| 6 | +@-webkit-keyframes whirl-book { |
| 7 | + 0% { |
| 8 | + -webkit-transform: rotateY(0deg); |
| 9 | + transform: rotateY(0deg); } |
| 10 | + 50%, |
| 11 | + 80% { |
| 12 | + -webkit-transform: rotateY(-180deg); |
| 13 | + transform: rotateY(-180deg); } |
| 14 | + 90%, |
| 15 | + 100% { |
| 16 | + opacity: 0; |
| 17 | + -webkit-transform: rotateY(-180deg); |
| 18 | + transform: rotateY(-180deg); } } |
| 19 | +@keyframes whirl-book { |
| 20 | + 0% { |
| 21 | + -webkit-transform: rotateY(0deg); |
| 22 | + transform: rotateY(0deg); } |
| 23 | + 50%, |
| 24 | + 80% { |
| 25 | + -webkit-transform: rotateY(-180deg); |
| 26 | + transform: rotateY(-180deg); } |
| 27 | + 90%, |
| 28 | + 100% { |
| 29 | + opacity: 0; |
| 30 | + -webkit-transform: rotateY(-180deg); |
| 31 | + transform: rotateY(-180deg); } } |
| 32 | + |
| 33 | +.book { |
| 34 | + height: 30px; |
| 35 | + position: relative; |
| 36 | + width: 30px; |
| 37 | + -webkit-perspective: 60px; |
| 38 | + perspective: 60px; } |
| 39 | + .book div { |
| 40 | + -webkit-animation: whirl-book 2s infinite; |
| 41 | + animation: whirl-book 2s infinite; |
| 42 | + background: var(--primary); |
| 43 | + height: 100%; |
| 44 | + position: absolute; |
| 45 | + left: 50%; |
| 46 | + -webkit-transform-origin: left; |
| 47 | + transform-origin: left; |
| 48 | + width: 100%; } |
| 49 | + .book div:nth-child(1) { |
| 50 | + -webkit-animation-delay: 0.15s; |
| 51 | + animation-delay: 0.15s; } |
| 52 | + .book div:nth-child(2) { |
| 53 | + -webkit-animation-delay: 0.3s; |
| 54 | + animation-delay: 0.3s; } |
| 55 | + .book div:nth-child(3) { |
| 56 | + -webkit-animation-delay: 0.45s; |
| 57 | + animation-delay: 0.45s; } |
| 58 | + .book div:nth-child(4) { |
| 59 | + -webkit-animation-delay: 0.6s; |
| 60 | + animation-delay: 0.6s; } |
| 61 | + .book div:nth-child(5) { |
| 62 | + -webkit-animation-delay: 0.75s; |
| 63 | + animation-delay: 0.75s; } |
0 commit comments