Skip to content

Instantly share code, notes, and snippets.

@aurelkurtula
Last active August 6, 2020 06:56
Show Gist options
  • Save aurelkurtula/5319619 to your computer and use it in GitHub Desktop.
Save aurelkurtula/5319619 to your computer and use it in GitHub Desktop.
hover with animation
/**
* hover with animation
*/
article{
width: 150px; height: 150px;
background: #ede;
display: block
margin: 150px;
overflow:hidden;
position: relative;
}
img{
position: absolute;
zoom: 200%;
width: 150px
}
img{
transition: all .30s;
}
h1{
transition: all .80s;
}
article:hover img{
-webkit-filter: hue-rotate(50deg);
zoom: -1; zoom: 100%; }
h1{ position: absolute;
display: block;
margin:110% 26% 0 26%;
}
article:hover h1{
margin-top: 30%;
}
<article>
<img src="http://dc397.4shared.com/img/77kpLlf3/homer-doh-square.jpg">
<h1>this is</h1>
</article>
// alert('Hello world!');
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment