shuang121

     浮动广告就是随着鼠标的滚动而上线滚动的广告,代码很简单,很好实现:

 

View Code
    <!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=gb2312" />
<title>无标题文档</title>
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE7" />
 <script type="text/livescript">
 
var a=10;
 
function aa()
 {
    document.getElementById(
"bb").style.pixelTop=a+document.documentElement.scrollTop;
 }
 window.onscroll
=aa;
 
</script>
</head>

<body>

<div id="bb" style="width:93px; height:80px; border:1px solid red; position:absolute; z-index:2">
<img src="link1.gif" /
</div>

</body>
</html>

 

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-08-09
  • 2022-02-25
  • 2021-09-20
  • 2021-09-04
  • 2021-09-04
  • 2021-10-11
猜你喜欢
  • 2021-11-14
  • 2022-01-15
  • 2022-12-23
相关资源
相似解决方案