㈠ 怎样能制作出雪花飘落的动态效果图片
用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>
说明:可以根据自己的需求根据说明进行相应参数的修改