當前位置:編程學習大全網 - 網站源碼 - 對聯廣告jquery特效代碼

對聯廣告jquery特效代碼

<html>

<head>

<meta?http-equiv="Content-Type"?content="text/html;?charset=gb2312"?/>

<style?type="text/css">

#ad1,#ad2{

-webkit-transition:?all?.5s?ease-out;

-moz-transition:?all?.5s?ease-out;

-o-transition:?all?.5s?ease-out;

transition:?all?.5s?ease-out;

POSITION:absolute;

TOP:120px;

width:100px;

height:200px;

border:1px?solid?red;

}

</style>

</head>

<body>

<div?id="mm"?style="height:2000px;background:#f5f5f5;width:500px">

</div>

<DIV?id="ad1"?style='left:2px;'>ad1</div>

<DIV?id="ad2"?style='right:2px;'>ad2</div>

<script?language="JavaScript"?type="text/javascript">

document.onscroll=function(){

$("#ad1").style.top=document.body.scrollTop+120+'px';

$("#ad2").style.top=document.body.scrollTop+120+'px';

};

</script>

</body>

</html>

  • 上一篇:_狀元的成語_狀元的成語是什麽
  • 下一篇:webuploader如何用js觸發點擊事件
  • copyright 2024編程學習大全網