App下載
首頁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://m.o2fo.com/style/download.png" class="fadein" />
</body>
</html>