Skip to content

Instantly share code, notes, and snippets.

@luizcarraro
Last active July 11, 2017 11:28
Show Gist options
  • Save luizcarraro/ef8975f7c63c69124803b5ec2b83fc48 to your computer and use it in GitHub Desktop.
Save luizcarraro/ef8975f7c63c69124803b5ec2b83fc48 to your computer and use it in GitHub Desktop.
Div background zoom in - http://jsfiddle.net/k3qw9ka1/2/
// Trocar body pela Div
body:before {
-webkit-animation: 10s normal forwards zoomin ease-in;
animation: 10s normal forwards zoomin ease-in;
background-image: url("http://www.artisanaljavascript.com/images/tradition.jpg");
background-size: cover;
content: " ";
height: 100%;
position: fixed;
-webkit-transform-origin: center center 0;
transform-origin: center center 0;
width: 100%;
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
@-webkit-keyframes zoomin {
0% { -webkit-transform: scale(1); transform: scale(1); }
100: { -webkit-transform: scale(1.5); transform: scale(1.5); }
}
@keyframes zoomin {
0% { -webkit-transform: scale(1); transform: scale(1); }
100: { -webkit-transform: scale(1.5); transform: scale(1.5); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment