刚才项目组长叫我找一个脚本,是这样描述的:
网页某一边上有菜单栏 ,平时只露出一点小边,鼠标移过去的话才完全显示出来。肯定是见到过类似的功能,但是不知道从哪个网页上见得了。各位大侠有类似的网页么,提供下谢谢啦!

解决方案 »

  1.   

    楼主 试试<!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>
    <style>
    #test {
    width:200px; height:200px; background:#eee;
    position:absolute; top:100px; left:-140px;
    }
    </style>
    </head>
    <body>
    <div id="test"></div>
    <script>
    function $(o){return document.getElementById(o)}
    $('test').onmouseover = function(){
    this.style.left = '0';
    }
    $('test').onmouseout = function(){
    this.style.left = '-140'+'px';
    } </script>
    </body>
    </html>
      

  2.   

    <!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=utf-8" />
    <script src="http://zhuxian.wanmei.com/js/jquery.js" language="javascript" type="text/javascript"></script>
    <style>.reg-box{position:absolute; width:181px; height:371px; top:300px; right:0; overflow:hidden;}
    #p_right1{position:absolute; width:181px; height:371px; right:0; top:0px; z-index:10}
    .cols_reg{float:right; width:30px; height:20px; cursor:pointer}
    .kx_reg{ float:left; height:278px; padding-top:39px;}
    .btn_khd{width:175px; height:33px; display:block; text-indent:-999em; float:left}
    #p_right2{width:90px; height:227px; position:absolute; right:-100px;top:0px; cursor:pointer}</style>
    </head><body>
    <div class="reg-box">
    <div id="p_right1" style="background:#3F0">
    <div class="cols_reg" id="closed" title="关闭">关闭</div>
        <div class="kx_reg">
        
        </div>
    </div>
     <div id="p_right2" style="background:#00C"></div>
     <div class="clr"></div>
     </div>
    <script type="text/javascript">
    $(function(){
    var name = $('.reg-box');  //滚动广告的ID
    function showAd(time){
    setTimeout(function(){
    $(name).show();},time);
    }
    function hideAd(time){
    setTimeout(function(){
    $(name).hide();},time);
    }
    $('#close').hide();
    showAd(500); //页面加载完毕多久后显示广告
    //hideAd(31000); //页面加载完毕多久后关闭广告
    function scrollAd(){
    var offset = $(window).height() - $(name).height()- 10 + $(document).scrollTop()-200;
    $(name).animate({top:offset},{duration:200,queue:false});
    }
    scrollAd();
    $(window).scroll(scrollAd);
    });
    $(document).ready(function(){
    $('#closed').click(function(){
    $('#p_right1'). animate({'right':'-200px'},200,function(){
    $('#p_right2'). animate({'right':'0px'});
    })
    })
    $('#p_right2').click(function(){
    $('#p_right2'). animate({'right':'-100px'},200,function(){
    $('#p_right1'). animate({'right':'0px'});
    })
    })

    })
    </script>
    </body>
    </html>