Skip to content

Instantly share code, notes, and snippets.

@teeaich
Created August 13, 2013 13:16
Show Gist options
  • Select an option

  • Save teeaich/6220965 to your computer and use it in GitHub Desktop.

Select an option

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)
.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