首页javascriptimgjQuery HTML Element - 如何淡入图像加载

jQuery HTML Element - 如何淡入图像加载

我们想知道如何淡入图像加载。

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-2.0.2.js'></script>
<style type='text/css'>
.fadein {
  display: none;
}
</style>
<script type='text/javascript'>
$(window).load(function(){
    $('.fadein').fadeIn(2500);
});
</script>
</head>
<body>
  <img src="http://www.w3cschool.cn/style/download.png" class="fadein" />
</body>
</html>