HTML下雪代码

JavaScript09

HTML下雪代码,第1张

<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 = 0i <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: absoluteZ-INDEX: "+ i +"VISIBILITY: visibleTOP: 15pxLEFT: 15px\"><img src='"+snowsrc+"' border=\"0\"></a></div>")

} else {

document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absoluteZ-INDEX: "+ i +"VISIBILITY: visibleTOP: 15pxLEFT: 15px\"><img src='"+snowsrc+"' border=\"0\"></div>")

}

}

}

function snowNS() { // Netscape main animation function

for (i = 0i <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 = 0i <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"这句是你雪花图片的地址

1.flavr—超级漂亮的jQuery扁平弹出对话框     

2.轻量级触摸响应滑块插件JQuery lightSlider      

3.带37种3D动画特效的跨浏览器CSS3动画框架       

4.jquery整屏滚动插件Scrollify        

5.jquery旋转木马插件SLICK         

6.jquery文字动画插件LetterFX          

7.jquery文本翻转插件Wodry.js       

8.jquery通知插件toastr       

9.jQuery滚动执行动画插件FadeThis      

10.jquery表单验证插件Bootstrap Validator       

11.jCountdown倒计时插件jQuery           

12.iCheck不一样的checkbok         

13.Owl Carousel强大的响应式jQuery焦点图轮播插件   

14.magic-带64种动画效果的CSS3动画库     

15.jQuery实时搜索插件-HideSeek       

16.bootstrap modal对话框             

17.一款模拟CSS3动画的js插件-move.js              

18.可替代CSS3 transition和transform的jQuery插件          

19.基于bootstrap的jQuery多功能模态对话框插件

20.带CSS3过渡效果的js模态窗口插件        

21.支持移动触摸设备的简洁js幻灯片插件

22.jQuery轻量级响应式扁平风格tabs选项卡插件

23.jQuery轻量级响应式Tooltip插件

24.jQuery简单且功能强大的图片剪裁插件

25.带CSS3动画过渡效果的jQuery模态窗口插件

26.中国省市区地址三级联动jQuery插件

27.移动端优先且支持jQuery和Zepto的模态对话框插件

28.jQuery简单实用的tooltip插件

29.带CSS3过渡动画效果的jQuery Tabs选项卡插件

30.x0popup-纯js弹出对话框插件

31.WOW.js-元素在页面滚动时展示CSS3动画JS插件

32.Windows8样式的消息提示框jQuery插件

33.jQuery星级评分插件

34.fsBanner-实用的网站响应式Banner手风琴插件

35.draggabilly-功能强大的拖动拖拽元素插件

36.验证插件vali.js

37.响应式jQuery图片放大镜插件magnificent.js

38.可快速生成各种阴影效果的jQuery插件

39.基于jquery的非常逼真的全屏下雪效果

40.纯文本Loading加载指示器特效

1、打开抖音之后,点击抖音首页右上角的搜索标志。

2、输入下雪了进行搜索。

3、点击搜索到的下雪了道具。

4、进入下雪了道具页面后,点击页面下方的拍同款标志。

5、点击拍摄按钮进行拍摄,拍摄时,画面就会出现下雪的场景,很逼真,就好像置身其中一样。

6、点击发布,这样下雪了特效视频就拍摄完成了。