人形时钟和小仓鼠的代码

  • 人形时钟

<div height="120" width="150" align="center"><embed height="120" width="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_wh.swf" quality="high" autostart="1" wmode="transparent"></div>

  • 小仓鼠

<embed type="application/x-shockwave-flash" src="http://cdn.abowman.com/widgets/hamster/hamster.swf" width="250" height="210" id="flashID" name="flashID" bgcolor="#FFFFFF" quality="high" flashvars="up_backgroundColor=FFFFFF" wmode="opaque" allowscriptaccess="always">

1.当你长时间不理它的时候,它会安安静静地睡觉。

2.它会随着你的鼠标移动而移动。

3.点击空白处,可以喂栗子给它。

4.当你不理它的时候,它有时会在仓鼠轮里面拼命地跑步,有时不知道要干什么。

5.跑步累了或是栗子吃多了,它就会去喝水。

通过修改width和height值的大小,可以改变插件的大小。

还有其他一些好玩的可以在大牛的网站上找到(http://abowman.com/google-modules/)

虽然这些都是flash动画而在最新的chrome是以h5为默认,但flash还需比较长的一段时间才会被h5所替代。

  • 百度分享代码(浮窗)

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"2","bdPos":"right","bdTop":"100"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

更多分享代码可访问http://share.baidu.com/

  • IP地址代码

//站长之家

<script type="text/javascript" src="http://ip.chinaz.com/getip.aspx"></script>

//搜狐接口

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script type="text/javascript">
document.write(returnCitySN["cip"]+','+returnCitySN["cname"])
</script>

//1616

<script src="http://w.1616.net/chaxun/iptolocal.php"></script>
<script>console.log(WData)</script>

//126(地址)

<script src="http://ip.ws.126.net/ipquery"></script>
<script>console.log(lo);console.log(lc);</script>

  • flagcounter

<a href="http://s11.flagcounter.com/more/MQy"><img src="http://s11.flagcounter.com/count2/MQy/bg_FFFFFF/txt_000000/border_CCCCCC/columns_2/maxflags_10/viewers_0/labels_0/pageviews_0/flags_0/percent_0/" alt="Flag Counter" border="0"></a>

  • 下雪代码

<!--下雪-->
<script>
(function($){$.fn.snow=function(options){var $flake=$('<div id="flake" />').css({'position':'absolute','top':'-50px'}).html('&#10052;'),documentHeight=$(document).height(),documentWidth=$(document).width(),defaults={minSize:10,maxSize:20,newOn:500,flakeColor:"#FFFFFF"},options=$.extend({},defaults,options);var interval=setInterval(function(){var startPositionLeft=Math.random()*documentWidth-100,startOpacity=0.5+Math.random(),sizeFlake=options.minSize+Math.random()*options.maxSize,endPositionTop=documentHeight-40,endPositionLeft=startPositionLeft-100+Math.random()*200,durationFall=documentHeight*10+Math.random()*5000;$flake.clone().appendTo('body').css({left:startPositionLeft,opacity:startOpacity,'font-size':sizeFlake,color:options.flakeColor}).animate({top:endPositionTop,left:endPositionLeft,opacity:0.2},durationFall,'linear',function(){$(this).remove()});},options.newOn);};})(jQuery);
$.fn.snow({ minSize: 5, maxSize: 50, newOn: 1000, flakeColor: '#FFF' });
</script>

  •  小火箭代码
<!--返回顶部-->
<script src="http://cdn.bootcss.com/gsap/1.19.0/TweenMax.min.js"></script>
<script src="http://cdn.bootcss.com/gsap/1.19.0/plugins/ScrollToPlugin.min.js"></script>
<div id="shangxia2">
  <span id="gotop">
    <img src="http://static.mydearest.cn/img/rocket.svg" alt="返回顶部小火箭">
  </span>
</div>
<script>
$(window).scroll(function () {
        if ($(this).scrollTop() > 400) {   //scrollTop() 方法返回或设置匹配元素的滚动条的垂直位置。
            $('#gotop').fadeIn();  
        } else {
            $('#gotop').fadeOut();
        }
});
$("#gotop").click(function(e) {
   TweenMax.to(window, 1.5, {scrollTo:0, ease: Expo.easeInOut});
   var huojian = new TimelineLite();
    huojian.to("#gotop", 1, {rotationY:720, scale:0.6, y:"+=40", ease:  Power4.easeOut})
    .to("#gotop", 1, {y:-1000, opacity:0, ease:  Power4.easeOut}, 0.6)
    .to("#gotop", 1, {y:0, rotationY:0, opacity:1, scale:1, ease: Expo.easeOut, clearProps: "all"}, "1.4");
});   
</script>
/* 小火箭css */
#gotop {
    display:none;
    width: 80px;
    position: fixed;
    bottom: 90px;
    cursor: pointer;
    z-index: 99998;
    right: 50%;
    margin-right: -620px;
}
  
/* 小火箭悬停特效 */
  
#gotop:hover {
    animation: rubberBand 1s;
}
  
@keyframes rubberBand {
  from {
    transform: scale3d(1, 1, 1);
  }
  
  30% {
    transform: scale3d(1.25, 0.75, 1);
  }
  
  40% {
    transform: scale3d(0.75, 1.25, 1);
  }
  
  50% {
    transform: scale3d(1.15, 0.85, 1);
  }
  
  65% {
    transform: scale3d(.95, 1.05, 1);
  }
  
  75% {
    transform: scale3d(1.05, .95, 1);
  }
  
  to {
    transform: scale3d(1, 1, 1);
  }
}
原文地址:https://www.cnblogs.com/cosyer/p/6249309.html