html特效下雪(html下雨特效)
华为云服务器特价优惠火热进行中! 2核2G2兆仅需 38 元;4核4G3兆仅需 79 元。购买时间越长越优惠!更多配置及优惠价格请咨询客服。
合作流程: |
本篇文章给大家谈谈html特效下雪,以及html下雨特效对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
微信号:cloud7591如需了解更多,欢迎添加客服微信咨询。
复制微信号
本文目录一览:
- 1、怎样使用html代码做下雪特效
- 2、如何在百度空间做个下雪特效
- 3、下雪的特效怎么实现html
- 4、HTML下雪代码
- 5、百度空间CSS 下雪特效的代码能不能写过来啊
- 6、那位知道哪里怎么在网页制作中添加下雪的特效。帮帮忙!谢了!!!
怎样使用html代码做下雪特效
记事本编写的html 然后IE预览-截屏-图像编辑软件-导出图片-右键设置为桌面。bactxxbactxx 的方法行!一切为了效果!
如何在百度空间做个下雪特效
分类: 电脑/网络 百度 百度空间
解析:
给你一个很漂亮的,源程序也很短。把下面那段放进BODY就行了。
style
.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 40; color: blue }
/style
script language="javascript"
snow = false; false-rain; true-snow
snowsym = " * " These are the symbols for each
rainsym = " * " You can put images here.
howmany = 15 How many drops/snowflakes?
/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=5; angle=6; drops=howmany}
else{sym = rainsym; speed=3; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;
function moverain(){
for(move = 0; move drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] 0){xx[move] = maxx+10;}
if(yy[move] maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}
/script
script language="javascript"
if (document.all){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()
ly = "document.all[\'"; st = "\'].style"
for(make = 0; make drops; make++){
document.write('div id="drop'+make+'" class=drop'+sym+'/div');
drop[make] = eval(ly+'drop'+make+st);
maxx = document.body.clientWidth-40
maxy = document.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/16;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = '#336699'}else{col = 'green'}
drop[make].color = col;
}
window.onload=moverain
}
/script
一定是的啦。。行不行瞧瞧吧
下雪的特效怎么实现html
要么用js做,要么就做成把循环动画或者视频效果转成gif格式的,我以前都是用gif来做的,这样会比较快也简单,而且下雪动画做成循环模式一般文件也不会很大
HTML下雪代码
html
head
/head
BODY bgcolor="#000000"
SCRIPT language=JavaScript1.2
var snowsrc="images/xuehua1.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=\"50\" top=\"50\" visibility=\"show\"img src='"+snowsrc+"' border=\"0\"/a/layer");
} else {
document.write("layer name=\"dot"+ i +"\" left=\"50\" top=\"50\" 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;\"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
/body
/html
记得给我加分啊
var snowsrc="images/xuehua1.gif"这句是你雪花图片的地址

百度空间CSS 下雪特效的代码能不能写过来啊
其实那个是以下雪的图片做为背景图片,并不是什么特效把背景图片加入 background:url(
)
那位知道哪里怎么在网页制作中添加下雪的特效。帮帮忙!谢了!!!
这些特效一半是加在<TBODY><TR>之间
下面那个是个网页特效网站,把要找的代码加进去一保存
OK
html特效下雪的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于html下雨特效、html特效下雪的信息别忘了在本站进行查找喔。
