Created
August 13, 2013 13:16
-
-
Save teeaich/6220965 to your computer and use it in GitHub Desktop.
simple content appearing from left and right when trigger class is set (for example scrolling)
This file contains hidden or 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
| .cbp-so-init .cbp-so-side { | |
| opacity: 0; | |
| -webkit-transition: none; | |
| -moz-transition: none; | |
| transition: none; | |
| } | |
| .cbp-so-init .cbp-so-side-left { | |
| -webkit-transform: translateX(-80px); | |
| -moz-transform: translateX(-80px); | |
| transform: translateX(-80px); | |
| } | |
| .cbp-so-init .cbp-so-side-right { | |
| -webkit-transform: translateX(80px); | |
| -moz-transform: translateX(80px); | |
| transform: translateX(80px); | |
| } | |
| /* Animated state */ | |
| /* add you final states (transition) or your effects (animations) for each side */ | |
| .cbp-so-section.cbp-so-animate .cbp-so-side-left, | |
| .cbp-so-section.cbp-so-animate .cbp-so-side-right { | |
| -webkit-transition: -webkit-transform 0.5s, opacity 0.5s; | |
| -moz-transition: -moz-transform 0.5s, opacity 0.5s; | |
| transition: transform 0.5s, opacity 0.5s; | |
| -webkit-transform: translateX(0px); | |
| -moz-transform: translateX(0px); | |
| transform: translateX(0px); | |
| opacity: 1; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment