分享

简单的对联广告

 昵称7519349 2011-08-19
<html>

    <head><title>对联广告</title>
        <style>
         body{
           height:2000px;
        
         }       
             .dui{
             width:100px;
             height:400px;
             border:1px solid red;
         }   
         #left{
             float:left;
             overflow:hidden;
             position:relative;
             background:url('left_ad.jpg')
         }
         #right{
             float:right;
             position:relative;
             background:url('right_ad.jpg')
         }
        .fix{
         
           position:fixed;
           top:150px;
         
       }
        </style>
    </head>

    <body>
        <script src='jquery-1.4.2.min.js'></script>
        <script>
                  jQuery(document).ready(function(jquery){
              jquery(window).scroll(function (){
            var to=jquery('.fix').offset().top;
            jquery('.dui').animate({
             top:to+'px'
            },'200');
     
       
     
              
        });
    });
        </script>
       
        <div id='left' class='dui'>
             <div class='fix'></div>
        </div>  
                <div id='right' class='dui'></div>
    </body>
</html>



   


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约