forked from tapquo/Lungo.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First tests with animation keyframes
- Loading branch information
1 parent
b871006
commit 798e062
Showing
6 changed files
with
181 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
TIME = 0.4s | ||
|
||
.moveToLeft | ||
vendor(animation, moveToLeft TIME ease both) | ||
.moveFromLeft | ||
vendor(animation, moveFromLeft TIME ease both) | ||
.moveToRight | ||
vendor(animation, moveToRight TIME ease both) | ||
.moveFromRight | ||
vendor(animation, moveFromRight TIME ease both) | ||
.moveToBack | ||
vendor(animation, moveToBack TIME ease both) | ||
|
||
@-webkit-keyframes moveToLeft | ||
100% { -webkit-transform: translateX(-100%); } | ||
@-moz-keyframes moveToLeft | ||
100% { -moz-transform: translateX(-100%); } | ||
@keyframes moveToLeft | ||
100% { transform: translateX(-100%); } | ||
|
||
@-webkit-keyframes moveFromLeft | ||
0% { -webkit-transform: translateX(-100%); } | ||
@-moz-keyframes moveFromLeft | ||
0% { -moz-transform: translateX(-100%); } | ||
@keyframes moveFromLeft | ||
0% { transform: translateX(-100%); } | ||
|
||
@-webkit-keyframes moveToRight | ||
100% { -webkit-transform: translateX(100%); } | ||
@-moz-keyframes moveToRight | ||
100% { -moz-transform: translateX(100%); } | ||
@keyframes moveToRight | ||
100% { transform: translateX(100%); } | ||
|
||
@-webkit-keyframes moveFromRight | ||
0% { -webkit-transform: translateX(100%); } | ||
@-moz-keyframes moveFromRight | ||
0% { -moz-transform: translateX(100%); } | ||
@keyframes moveFromRight | ||
0% { transform: translateX(100%); } | ||
|
||
|
||
|
||
@-webkit-keyframes moveToBack | ||
100% { | ||
-webkit-transform: rotateX(20deg) translateZ(-100px); | ||
transform-origin: 100% 50%; | ||
opacity: .3; | ||
} | ||
@-moz-keyframes moveToLeft | ||
100% { | ||
-moz-transform: rotateX(20deg) translateZ(-100px); | ||
opacity: .3; | ||
} | ||
@keyframes moveToLeft | ||
100% { | ||
transform: rotateX(20deg) translateZ(-100px); | ||
opacity: .3; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@import "__init.styl" | ||
|
||
body | ||
vendor(perspective, 800px) | ||
vendor(transform-style, preserve-3d) | ||
|
||
& > section | ||
display-box() | ||
width: 100% | ||
height: 100% | ||
position: absolute | ||
top: 0 | ||
left: 0 | ||
visibility: hidden | ||
overflow: hidden | ||
transform translate3d(0, 0, 0) | ||
vendor(backface-visibility, hidden) | ||
|
||
&.show | ||
visibility: visible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters