㈠ 怎樣能製作出雪花飄落的動態效果圖片
用flash引導線製作雪花飄落的動畫教程
在 Flash 中利用引導線製作雪花飄飄動畫。 這種方法最笨但也效果最好,就是用引導線功能,讓雪花不停的飄呀飄,如果多用幾個圖層,效果更好。
1、新建一個flash影片。設背景為「黑色」,其他的用默認值。
2、按ctrl+f8新建一個組件,類型為「影片剪輯」,命名為「雪花」。在它的正中用「鉛筆」工具畫一個不規則的多邊形,然後用「顏料桶工具」將它填上白色。(如圖1-1所示)
3、再用ctrl+f8建一個組件,類型為「影片剪輯」,命名為「前層」。
4、將組件「雪花」拖到其中,用「選定工具」中的「比例」功能把它縮小(小技巧:先用「放大鏡」將它放大,然後再用「比例」功能,可縮得更小)。在第80幀上「插入關鍵幀」,在「圖層1」上用滑鼠右鍵的「添加引導線」功能(見圖1-2)。
在新增加的「引導線:圖層1」的第1幀上,從「雪花」開始,畫一條彎曲的曲線。將第80幀上的「雪花」沿曲線從頭拖到曲線的末尾。然後在「圖層1」的第1幀上點滑鼠右鍵,選「創見動畫動作」功能,見圖1-3。
5、第4步是製作一片雪花,下雪不是只下一片的吧。插入圖層,將第4步重復做10次。做好後的效果見圖1-4。6、把第3至5步重復做兩次,不同之處是組件的命名分別為「中層」和「後層」。「雪花」的大小和「引導線」的路徑不要一樣。這是為了多做幾個圖層,看起來效果細膩一點。
7、現在回到場景1中,插入6個圖層,分別命名為「後層1」、「後層2」、「中層1」、「中層2」、「中層3」、「中層4」、「前層1」、「前層2」。在對應的層上拖入對應的組件,並適當的調整時間軸,讓雪花飄得連貫起來。見圖1-5。
按ctrl+enter就可以看到效果了。
(這種方法簡單且效果好,主要是用「引導線」功能,讓雪花不停的飄下,多用幾個圖層效果會更好)
㈡ 跪求用dreamweaver製作花瓣或雪花飄落效果!!!
效果是用flash做出來,然後導入到dw的,你看看flash源文件有沒有破損,如果沒有,看看代碼引入,有沒有錯誤
㈢ 用javascript腳本製作雪花飄落的網頁特效如何設置雪花間的間距 用javascript腳本
可以設置雪花圖片的padding就可以了呀
㈣ QQ空間雪花代碼
可以通過添加透明flash來達到你要的效果,以下是使用方法和可以引用的透明flash地址(有多個是雪花的效果,可以仔細找下):
日誌加透明flash步驟:
1.在日誌頁面上點擊(寫日誌)
2.點擊那個紅色圖案
3.輸入透明Flash地址
4.點自定義、(寬.800.px 高.800.px)
5.點設置為透明背景(Flash需支持)
6.背景位置(left.0.px top.0.px)
以上任何一步不正確都不會被顯示
http://imgfree.21cn.com/free/flash/209.swf 紅色汽球
http://i39.photobucket.com/albums/e161/haihaiyoyo/-1.swf 小紅心組大紅心
http://i39.photobucket.com/albums/e161/haihaiyoyo/iloveu.swf我愛你加星光
http://i82.photobucket.com/albums/j257/ayumi_927/True_Star.swf 掛五角星
http://1stblog.cn//swf/trns/001.swf 左右流星
http://1stblog.cn//swf/trns/002.swf 一隻蜻蜓
http://imgfree.21cn.com/free/flash/1.swf紅色背景白色小流星
http://imgfree.21cn.com/free/flash/2.swf淺綠色背景亮色豎條
http://imgfree.21cn.com/free/flash/3.swf光球光芒時隱時現
http://imgfree.21cn.com/free/flash/4.swf米字星光
http://imgfree.21cn.com/free/flash/5.swf灰色背景米字星光
http://imgfree.21cn.com/free/flash/6.swf灰藍背景飄落雨滴
http://imgfree.21cn.com/free/flash/7.swf黃色背景飛星閃閃
http://imgfree.21cn.com/free/flash/8.swf青蛙
http://imgfree.21cn.com/free/flash/9.swf藍色蝴蝶
http://imgfree.21cn.com/free/flash/10.swf豎條箭頭
http://imgfree.21cn.com/free/flash/11.swf寬窄豎條
http://imgfree.21cn.com/free/flash/12.swf左右晃動的豎條(寬、窄)
http://imgfree.21cn.com/free/flash/13.swf黑色背景旋轉輪盤
http://imgfree.21cn.com/free/flash/14.swf蝌蚪旋轉、隨滑鼠的白色光團
http://imgfree.21cn.com/free/flash/15.swf黑色背景綠色飄帶幻影
http://imgfree.21cn.com/free/flash/16.swf黑色背景飛星閃閃
http://imgfree.21cn.com/free/flash/17.swf金魚
http://imgfree.21cn.com/free/flash/18.swf藍色背景水平飛鏢
http://imgfree.21cn.com/free/flash/19.swf左右晃動的豎條
http://imgfree.21cn.com/free/flash/20.swf黑色背景水平閃動的橫條
http://imgfree.21cn.com/free/flash/21.swf黑色背景光暈
http://imgfree.21cn.com/free/flash/22.swf光圈由小變大
http://imgfree.21cn.com/free/flash/23.swf藍色背景雪花飄飄
http://imgfree.21cn.com/free/flash/24.swf左右閃動的豎條
http://imgfree.21cn.com/free/flash/25.swf三隻黑螞蟻
http://imgfree.21cn.com/free/flash/26.swf左右晃動的黃、綠、藍豎線
http://imgfree.21cn.com/free/flash/27.swf無色背景水珠
http://imgfree.21cn.com/free/flash/28.swf黑色背景豎條
http://imgfree.21cn.com/free/flash/29.swf圓圈內海浪波動
http://imgfree.21cn.com/free/flash/30.swf黑色背景藍色夢幻
http://imgfree.21cn.com/free/flash/30.swf黑色背景藍色夢幻
http://imgfree.21cn.com/free/flash/31.swf黑色背景無數小亮點飄落
http://imgfree.21cn.com/free/flash/32.swf長發女孩
http://imgfree.21cn.com/free/flash/33.swf粉黃色5瓣花飄飄
http://imgfree.21cn.com/free/flash/35.swf小星、大星光暈夢幻
http://imgfree.21cn.com/free/flash/35.swf紫色唇印升騰
http://imgfree.21cn.com/free/flash/36.swf上下閃動的橫條
http://imgfree.21cn.com/free/flash/37.swf綠色、黃色的樹葉飛舞
http://imgfree.21cn.com/free/flash/38.swf流星飛降
http://imgfree.21cn.com/free/flash/39.swf小+字旋轉大光圈
http://imgfree.21cn.com/free/flash/40.swf大、小八瓣雪花飄落
http://imgfree.21cn.com/free/flash/41.swf紫色背景大、小八瓣雪花飄落
http://imgfree.21cn.com/free/flash/42.swf空中飄動的黃球
http://imgfree.21cn.com/free/flash/45.swf兩只黃色的蝴蝶在左上角飛舞
http://imgfree.21cn.com/free/flash/46.swf一片淺粉色的雲團
http://imgfree.21cn.com/free/flash/47.swf 箭頭左右穿梭
http://imgfree.21cn.com/free/flash/48.swf一個光球從右上方慢慢飛入
http://imgfree.21cn.com/free/flash/49.swf飄落的淺粉色花瓣
http://imgfree.21cn.com/free/flash/50.swf晃動的文字「sweet kiss day」
http://imgfree.21cn.com/free/flash/51.swf三隻飛舞的蜻蜓、閃閃的星光
http://imgfree.21cn.com/free/flash/52.swf黑色背景飄落的紅葉
http://imgfree.21cn.com/free/flash/53.swf雪糕降落
http://imgfree.21cn.com/free/flash/54.swf綠色的心和I love you垂直降落
http://imgfree.21cn.com/free/flash/55.swf兩只跳躍的青蛙
http://imgfree.21cn.com/free/flash/56.swf六邊形、降落的豎條
http://imgfree.21cn.com/free/flash/57.swf燕魚和水泡
http://imgfree.21cn.com/free/flash/58.swf光暈、光圈
http://imgfree.21cn.com/free/flash/59.swf天上散綠葉
http://imgfree.21cn.com/free/flash/59.swf藍色背景飛翔的海鷗
http://imgfree.21cn.com/free/flash/60.swf黑色背景降落的螢火蟲
http://imgfree.21cn.com/free/flash/61.swf飛騰的紅心
http://imgfree.21cn.com/free/flash/62.swf五彩禮花燃放
http://imgfree.21cn.com/free/flash/63.swf黃色的四瓣花飄落
http://imgfree.21cn.com/free/flash/64.swf淺藍色的雪花在空中,小雪花降落
http://imgfree.21cn.com/free/flash/65.swf飄落的空心小蘭圈
http://imgfree.21cn.com/free/flash/66.swf一隻手的圖形
http://imgfree.21cn.com/free/flash/67.swf由遠而近飛來的流星
http://imgfree.21cn.com/free/flash/68.swf黑色背景飄落的雪花
http://imgfree.21cn.com/free/flash/69.swf七彩光光芒四射(全屏)
http://imgfree.21cn.com/free/flash/70.swf七彩光光芒四射(全屏)
http://imgfree.21cn.com/free/flash/71.swf閃動的小豎條
http://imgfree.21cn.com/free/flash/72.swf一隻和平鴿展翅飛舞
http://imgfree.21cn.com/free/flash/73.swf藍色背景藍色氣泡慢慢升空
http://imgfree.21cn.com/free/flash/74.swf白色背景淺藍色的氣泡慢慢升空
http://imgfree.21cn.com/free/flash/75.swf跟隨滑鼠游動的七彩光圈
http://imgfree.21cn.com/free/flash/76.swf 線條變形
http://imgfree.21cn.com/free/flash/77.swf藍色旋轉
http://imgfree.21cn.com/free/flash/78.swf跟隨滑鼠旋轉的數字時鍾
http://imgfree.21cn.com/free/flash/79.swf滑鼠滑過方塊圖形變換
http://www.12127.net/q-zone/tx/4.swf滿天星星
http://www.12127.net/q-zone/tx/5.swf米字星光
http://www.12127.net/q-zone/tx/7.swf大雨點
http://www.12127.net/q-zone/tx/8.swf發散的光
http://www.12127.net/q-zone/tx/9.swf背景光暈
http://www.12127.net/q-zone/tx/21.swf 背景光暈
http://www.12127.net/q-zone/tx/23.swf 藍色雪花
http://www.12127.net/q-zone/tx/31.swf黑色背景無數小亮點飄落
http://www.12127.net/q-zone/tx/33.swf粉黃色5瓣花飄飄
http://www.12127.net/q-zone/tx/35.swf小星、大星光暈夢幻
http://www.12127.net/q-zone/tx/41.swf紫色背景大、小八瓣雪花飄落
http://www.12127.net/q-zone/tx/42.swf蒲公英
http://www.12127.net/q-zone/tx/46.swf一片淺粉色的雲團
http://www.12127.net/q-zone/tx/51.swf三隻飛舞的蜻蜓、閃閃的星光
http://www.12127.net/q-zone/tx/52.swf黑色背景飄落的楓葉
http://www.12127.net/q-zone/tx/54.swf綠色的心和I love you垂直降落
http://www.12127.net/q-zone/tx/59.swf藍色背景飛翔的海鷗
http://www.12127.net/q-zone/tx/61.swf飛騰的紅心
http://www.12127.net/q-zone/tx/62.swf五彩禮花燃放
http://www.12127.net/q-zone/tx/64.swf淺藍色的雪花
http://www.12127.net/q-zone/tx/67.swf由遠而近飛來的流星
http://www.12127.net/q-zone/tx/69.swf飛翔的鷹
http://www.12127.net/q-zone/tx/73.swf藍色背景藍色氣泡慢慢升
http://www.12127.net/q-zone/tx/87.swf跟隨滑鼠移動的黃色小球
http://www.12127.net/q-zone/tx/69.swf七彩光光芒四射(全屏)
http://www.12127.net/q-zone/tx/82.swf雪花旋舞
http://www.12127.net/q-zone/tx/84.swf閃動的白色圓圈
http://www.12127.net/q-zone/tx/89.swf金光閃閃(中間到四周)
http://www.12127.net/q-zone/tx/92.swf飄舞的七彩絲線
http://www.12127.net/q-zone/tx/93.swf閃電效果
http://www.12127.net/q-zone/tx/95.swf 七彩光8字形旋轉
http://www.12127.net/q-zone/tx/97.swf 旋轉的花瓣、蝴蝶隨滑鼠飛舞
http://www.12127.net/q-zone/tx/98.swf 飛旋的七彩光
http://www.12127.net/q-zone/tx/99.swf 白色旋轉的花瓣變形
http://www.12127.net/q-zone/tx/100.swf 藍寶石七彩閃光
http://www.12127.net/q-zone/tx/103.swf 從空特大雨滴
http://www.12127.net/q-zone/tx/mhh.swf 漂亮的玫瑰花從上飄落
http://www.12127.net/q-zone/tx/sh.swf 從上飄落的鮮花和紅心
http://imgfree.21cn.com/free/flash/80.swf跟隨滑鼠的「歡迎下載」及七彩星
㈤ 利用JS給網頁添加雪花飄落的效果
1、修改部分如下:
<html>
<head>
<scriptsrc="http://www.ren3.cn/SnowDemo/jsized.snow.min.js"type="text/javascript"></script>
<script>
/**
*Thisfunctiontakes2arguments
*
*,pleasedonot
*
*/
createSnow("",60);//目錄改為當前目錄
</script>
</head>
<body>
測試
</body>
</html>
2、在該網頁目錄下新添加四張雪花圖片命名規則(snow0.gifsnow1.gifsnow2.gifsnow3.gif)
㈥ 求網頁飄雪花源代碼
把下列代碼加到網頁的<Body></Body>標簽之間
<html>
<head>
<title>:::飄雪花效果:::網頁特效代碼:::失落網家園http://livehe.51.net/</title>
</head>
<BODY bgcolor="#000000">
<SCRIPT language=JavaScript1.2>
var snowsrc="img/snow.gif"
var no = 10;
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height =600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://livehe.51.net//\"><img src='"+snowsrc+"' border=\"0\"></a></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://livehe.51.net/\"><img src='"+snowsrc+"' border=\"0\"></a></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");
}
}
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", 10);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
</SCRIPT>
<table border="0" width="100%" cellpadding="0">
<tr>
<td width="100%"><font color="#ffffff" size="2"><b>飄雪花效果</b>注意保存這個圖片(<img border="1" src="img/snow.gif" width="16" height="17">)</font></td>
</tr>
<tr>
<td width="100%">
</table>
<script language="JavaScript" type="text/javascript" src="js.js"></script><tr></body>
</html>
㈦ 為什麼以下html沒有出現想要的花瓣像雪花飄落效果(圖片是花瓣飄落)
我試了下你的代碼,在我的瀏覽器里,能出現你的說的效果,你看看是不是別的問題導致沒有效果的呀。
不行你再HI我好了。
㈧ html5怎樣在頁面中加入雪花效果
在後台添加js特效可實現這樣的效果。
js代碼為:
<script language="JavaScript">
<!--
var no = 5; //雪片數目
var speed = 20; //飄動速度。(值越大越慢)
var ns4up = (document.layers) ? 1 : 0; //當前瀏覽器類型,如果是NS則為1
var ie4up = (document.all) ? 1 : 0; //當前瀏覽器類型,如果是IE則為1
var s, x, y, sn, cs;
var a, r, cx, cy;
var i, doc_width = 800, doc_height = 600;
x = new Array();
y = new Array();
r = new Array();
cx = new Array();
cy = new Array();
s = 8; //每次下落的高度,越小越平滑,但是也越慢
if (ns4up) { //以NS兼容方式
doc_width = self.innerWidth; //取頁面寬度
doc_height = self.innerHeight; //取頁面高度
}
else
if (ie4up) { //以IE兼容方式
doc_width = document.body.clientWidth; //取頁面寬度
doc_height = document.body.clientHeight; //取頁面高度
}
for (i = 0; i < no; ++ i) { //根據前面定義的雪片數目寫進相應數目的層
initSnow(); //隨機初始化層的坐標
if (ns4up) { //如果瀏覽器是NS
//用layer作為雪片(星號)的容器
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"red\">");
document.write("*</font></layer>");
}
else
if (ie4up) { //如果瀏覽器是IE
//用div作為雪片的容器
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"red\">");
document.write("*</font></div>");
}
}
//初始化雪片,生成隨機坐標
function initSnow() {
a = 6;
r[i] = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx[i] = Math.random() * doc_width + 1;
cy[i] = Math.random() * doc_height + 1;
x[i] = r[i] * sn + cx[i];
y[i] = cy[i];
}
//計算雪花位置,從新位置上出現,看起來就像是新產生的一樣。
function makeSnow() {
r[i] = 1;
cx[i] = Math.random() * doc_width + 1;
cy[i] = 1;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
//雪花下落的計算
function updateSnow() {
r[i] += s;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
//在NS瀏覽器上處理雪片下落的主程序
function SnowdropNS() {
for (i = 0; i < no; ++ i) { //依次處理每片雪花
updateSnow(); //下落
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) { //如果超出屏幕范圍
makeSnow(); //則調整雪片到新位置上
doc_width = self.innerWidth; //更新頁面寬度數據
doc_height = self.innerHeight; //更新頁面高度數據
}
document.layers["dot"+i].top = y[i]; //改變層的Y坐標,應用新的位置
document.layers["dot"+i].left = x[i]; //改變層的X坐標,應用新的位置
}
setTimeout("SnowdropNS()", speed);
}
//在IE瀏覽器上處理雪片下落的主程序
function SnowdropIE() {
for (i = 0; i < no; ++ i) { //依次處理每片雪花
updateSnow(); //下落
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) { //如果超出屏幕范圍
makeSnow(); //則調整雪片到新位置上
doc_width = document.body.clientWidth; //更新頁面寬度數據
doc_height = document.body.clientHeight; //更新頁面高度數據
}
document.all["dot"+i].style.pixelTop = y[i]; //改變層的坐標,應用新的位置
document.all["dot"+i].style.pixelLeft = x[i];
}
setTimeout("SnowdropIE()", speed); //准備下一次下落過程。
}
if (ns4up) { //如果是NS
SnowdropNS(); //調用SnowdropNS使雪片下落
}
else
if (ie4up) { //如果是NS
SnowdropIE(); //調用SnowdropIE使雪片下落
}
-->
</script>
說明:可以根據自己的需求根據說明進行相應參數的修改