Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created March 26, 2013 22:05
Show Gist options
  • Save dziudek/5249744 to your computer and use it in GitHub Desktop.
Save dziudek/5249744 to your computer and use it in GitHub Desktop.
Chrome background-image transition demo
/**
* Chrome background-image transition demo
*/
div {
float: left;
height: 300px;
transition: all .5s ease-out;
width: 300px;
}
#test {
background: transparent url('http://placekitten.com/300/300') no-repeat 0 0;
}
#test:hover {
background-image: url('http://placekitten.com/g/300/300');
}
#test-scale {
background: transparent url('http://placekitten.com/300/300') no-repeat center center;
}
#test-scale:hover {
background-image: url('http://placekitten.com/g/250/250');
}
<!-- content to be placed inside <body>…</body> -->
<div id="test"></div>
<div id="test-scale"></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment