<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>