利用JS给网页添加雪花飘落的效果

JavaScript09

利用JS给网页添加雪花飘落的效果,第1张

1、修改部分如下:

<html>

 <head>

  <script src="http://www.ren3.cn/Snow Demo/jsized.snow.min.js" type="text/javascript"></script>        

<script>

    /**

     * This function takes 2 arguments

     * First is the path to the directory with snowflake images

     * Second is the maximum number of snowflakes, please do not

     * set this number above 60 as it will impact the performance

     */

    createSnow("", 60)//目录改为当前目录

</script>

 </head>

 <body>

  测试

 </body>

</html>

2、在该网页目录 下 新添加 四张雪花图片 命名规则(snow0.gif snow1.gif snow2.gif snow3.gif)

<div class="J_TWidget" data-widget-config="{'duration':0.1,'activeTriggerCls':'.tshop-psm-shop-ww-hover','interval':0.1,'effect':'scrollx','activeIndex':1,'navCls':'user-crzysj','contentCls':'user-crzysjii','autoplay':true}" data-widget-type="Carousel" style="position:relative"><ul class="user-crzysjii" style="display: nonewidth: 999999pxleft: 0pxposition: absolute"><li class="-_-switchable-panel-internal535 ks-switchable-panel-internal998" style="width: 475pxheight: 800pxdisplay: blockfloat: left"></li></ul><ul class="user-crzysj"><li class="-_-switchable-trigger-internal534 ks-switchable-trigger-internal997 tshop-psm-shop-ww-hover" style="width:475pxheight:800pxright:50%margin-right:505px"><embed allownetworking="all" allowscriptaccess="never" flashvars="scene=taobao_shop" height="1000" name="flashfirebug_1387778983714" src="http://img1.tbcdn.cn/tfscom/T1lmk2Fk8bXXXtxVjX.swf" type="application/x-shockwave-flash" width="475" wmode="transparent"></li></ul></div><div class="J_TWidget" data-widget-config="{'duration':0.1,'activeTriggerCls':'.tshop-psm-shop-ww-hover','interval':0.1,'effect':'scrollx','activeIndex':1,'navCls':'user-crzysj','contentCls':'user-crzysjii','autoplay':true}" data-widget-type="Carousel" style="position:relativez-index:99"><ul class="user-crzysjii" style="display: nonewidth: 999999pxleft: 0pxposition: absolute"><li class="-_-switchable-panel-internal635 ks-switchable-panel-internal1108" style="width: 475pxheight: 800pxdisplay: blockfloat: left"></li></ul><ul class="user-crzysj"><li class="-_-switchable-trigger-internal634 ks-switchable-trigger-internal1107 tshop-psm-shop-ww-hover" style="width:475pxheight:800pxleft:50%margin-left:505px"><embed allownetworking="all" allowscriptaccess="never" flashvars="scene=taobao_shop" height="1000" name="flashfirebug_1387778983652" src="http://img1.tbcdn.cn/tfscom/T1lmk2Fk8bXXXtxVjX.swf" type="application/x-shockwave-flash" width="475" wmode="transparent"></li></ul></div>

直接在首页添加个自定义模块 编辑 点两个箭头的那个编辑代码模式 然后复制代码放进去 确定就好!