公告

更新

 

互联网 JS控件 按钮 黑色 灰色 白色 蓝色 绿色 黄色 橙色

> 代码 > 其他整理

网页右下角滚动浮动信息代码
0
作者:vip_260     来源:未知     日期:2010/8/11 14:59:38     人气:      标签:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
 html,body{
  height:2000px;
 }
</style>
</head>

<body>
<div id="aa" style="width:200px;height:200px;background:#c0c0c0;" >拖动滚动条试试哦~<p align="center">本特效由 <a href="http://www.v404.cn">中国网站频道</a>收集于互联网,只为兴趣与学习交流,不作商业用途。</p>
</div>
<script>
    function scroll(p){
     var d = document,w = window,o = d.getElementById(p.id),ie6 = /msie 6/i.test(navigator.userAgent);
     if(o){
      o.style.cssText +=";position:"+(p.f&&!ie6?'fixed':'absolute')+";"+(p.r?'left':"right")+":0;"+(p.t!=undefined?'top:'+p.t+'px':'bottom:0');
      if(!p.f||ie6){
       -function(){
           var t = 500,st = d.documentElement.scrollTop||d.body.scrollTop,c;
                 c = st  - o.offsetTop + (p.t!=undefined?p.t:(w.innerHeight||d.documentElement.clientHeight)-o.offsetHeight);//如果你是html 4.01请改成d.body,这里不处理以减少代码
              c!=0&&(o.style.top = o.offsetTop + Math.ceil(Math.abs(c)/10)*(c<0?-1:1) + 'px',t=10);
              setTimeout(arguments.callee,t)
          }()
      }
     } 
    }
    scroll({
     id:'aa'
   
    })
</script>
</body>
</html>

Copyright 2008 网站频道 All Rights Resverved.
提供:网页特效 JS广告 网站截图 酷站推荐 交流群:3506863
     页面执行时间0.0313秒 查询数据库3次