Last Updated: February 25, 2016
·
2.537K
· eskimoblood

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