var bdy = (document.documentElement && document.documentElement.clientWidth)?document.documentElement:document.body;
var topPx = 80;//距离顶部的距离

//页面加载
function myload()
{
    document.getElementById("ecbox").style.top=bdy.scrollTop+topPx;
    move();
}

//滚动
function move()
{
    
    document.getElementById("ecbox").style.top=bdy.scrollTop+topPx;
    setTimeout("move();",50);
}

myload();

 

相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-07-18
  • 2021-07-19
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案