Fade in image after it was loaded
<html>
<head>
<meta charset=utf-8 />
<style>
.animate{
opacity: 1;
-webkit-transition: opacity 2s linear;
}
img{opacity: 0}
</style>
<title>JS Bin</title>
</head>
<body>
<img onload="this.className='animate'" src="https://www.google.de/logos/2012/olympics-archery-2012-res.png">
</body>
</html>
Preview: http://jsbin.com/amefit/2
Written by Andreas Köberle
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#