File tree Expand file tree Collapse file tree 6 files changed +75
-1
lines changed Expand file tree Collapse file tree 6 files changed +75
-1
lines changed Original file line number Diff line number Diff line change 16
16
</ head >
17
17
< body >
18
18
< div class ="a-perspective " style ="margin: 10rem; width: 213px ">
19
- < div style ="width: 213px " class ="a-rotate-flip ">
19
+ <!-- For 3d we need a div on top of the target element -->
20
+ <!-- please remember to document that -->
21
+ < div style ="width: 213px " class ="a-three-flip-up ">
20
22
< img src ="./all-animation.png " id ="element " />
21
23
</ div >
22
24
</ div >
Original file line number Diff line number Diff line change 14
14
15
15
// Perspective
16
16
@import ' ./perspective/perspective.scss' ;
17
+ @import ' ./three-flip-down/three-flip-down.scss' ;
18
+ @import ' ./three-flip-up/three-flip-up.scss' ;
19
+ @import ' ./three-flip-right/three-flip-right.scss' ;
20
+ @import ' ./three-flip-left/three-flip-left.scss' ;
17
21
@import ' ./flip-left-bounce/flip-left-bounce.scss' ;
18
22
@import ' ./flip-right-bounce/flip-right-bounce.scss' ;
19
23
@import ' ./rotate-flip/rotate-flip.scss' ;
Original file line number Diff line number Diff line change
1
+ .a-three-flip-down {
2
+ @include keyframes (threeFlipDown) {
3
+ 0% {
4
+ transform : rotateX (0 );
5
+ }
6
+
7
+ 100% {
8
+ transform : rotateX (-90deg );
9
+ }
10
+ }
11
+
12
+ transform : rotateX (90deg );
13
+ transform-origin : 0 100% ;
14
+
15
+ @include show ();
16
+ @include animate (threeFlipDown $perspective-bounce-timing ease-in-out 1 );
17
+ }
Original file line number Diff line number Diff line change
1
+ .a-three-flip-up {
2
+ @include keyframes (threeFlipUp) {
3
+ 0% {
4
+ transform : rotateX (0 );
5
+ }
6
+
7
+ 100% {
8
+ transform : rotateX (90deg );
9
+ }
10
+ }
11
+
12
+ transform : rotateX (90deg );
13
+ transform-origin : 100% 0 ;
14
+
15
+ @include show ();
16
+ @include animate (threeFlipUp $perspective-bounce-timing ease-in-out 1 );
17
+ }
Original file line number Diff line number Diff line change
1
+ .a-three-flip-right {
2
+ @include keyframes (threeFlipRight) {
3
+ 0% {
4
+ transform : rotateY (0 );
5
+ }
6
+
7
+ 100% {
8
+ transform : rotateY (90deg );
9
+ }
10
+ }
11
+
12
+ transform : rotateY (90deg );
13
+ transform-origin : 100% 0 ;
14
+
15
+ @include show ();
16
+ @include animate (threeFlipRight $perspective-bounce-timing ease-in-out 1 );
17
+ }
Original file line number Diff line number Diff line change
1
+ .a-three-flip-left {
2
+ @include keyframes (threeFlipLeft) {
3
+ 0% {
4
+ transform : rotateY (0 );
5
+ }
6
+
7
+ 100% {
8
+ transform : rotateY (-90deg );
9
+ }
10
+ }
11
+
12
+ transform : rotateY (-90deg );
13
+ transform-origin : 0 0 ;
14
+
15
+ @include show ();
16
+ @include animate (threeFlipLeft $perspective-bounce-timing ease-in-out 1 );
17
+ }
You can’t perform that action at this time.
0 commit comments