Skip to content

Instantly share code, notes, and snippets.

@Quinten
Created June 6, 2013 09:11
Show Gist options
  • Save Quinten/5720309 to your computer and use it in GitHub Desktop.
Save Quinten/5720309 to your computer and use it in GitHub Desktop.
float in transition in css (and a good looking boxshadow)
#element {
position: absolute;
top: 102px;
background: #fff;
opacity: 0;
visibility: hidden;
transition-property: top,opacity;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;
-webkit-transition-property: top,opacity;
-webkit-transition-duration: 0.4s;
-webkit-transition-timing-function: ease-in-out;
border-radius: 3px;
-webkit-box-shadow: 5px 5px 10px 2px rgba(0, 0, 0, 0.2);
box-shadow: 5px 5px 10px 2px rgba(0, 0, 0, 0.2);
}
#element {
top: 42px;
opacity: 1;
visibility: visible;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment