DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> WEB網站前端 >> 網頁特效代碼 >> HTML5+jQuery實現全屏煙花特效
HTML5+jQuery實現全屏煙花特效
編輯:網頁特效代碼     
許多地方在春節、元宵等節日有放煙花的習俗,如果在網頁上模擬煙花,以前也有一些javascript實現的效果,自從HTML5興起之後,網頁模擬煙花更加容易、逼真了。

效果展示:
http://hovertree.com/texiao/html5/43/

效果圖:


代碼如下:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>html5 canvas全屏煙花動畫特效 - 何問起</title><base target="_blank" />
<link rel="stylesheet" type="text/css" href="http://hovertree.com/texiao/html5/43/css/normalize.css" />
<link rel="stylesheet" type="text/css" href="http://hovertree.com/texiao/html5/43/css/hovertree.css">
</head>
<body>
<div class="hovertree"></div>
<script type="text/javascript" src="http://down.hovertree.com/jquery/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="http://hovertree.com/texiao/html5/43/js/jquery.fireworks.js"></script>
<script type="text/javascript">
$('.hovertree').fireworks({
sound: true, // sound effect
opacity: 0.9,
width: '100%',
height: '100%'
});
</script>
<div style="width:340px;position:fixed;z-index:99;">來源:<a href="http://hovertree.com/">何問起</a> <a href="http://hovertree.com/h/bjag/me34x8fk.htm">說明</a></div>
</body>
</html>
HTML5不只在圖像方面有許多進步,在聲音方面也有進步,本煙花特效還可以設置是否有聲音效果。sound: true 或者 sound: false 。

本特效源碼下載:
http://hovertree.com/h/bjag/24o31rk5.htm

HTML5的相關題目
以下不是canvas的方法是:
A、getContext()
B、fill()
C、stroke()
D、controller()
答案:http://hovertree.com/tiku/bjaf/4tlxjl9k.htm

相關效果:
http://hovertree.com/h/bjaf/epbhdsa3.htm
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved