打开http://www.ifeng.com/页面,页面的中央就会弹出一个层,有时候他会在右下角。
点击按钮他就显示出来了。再点就回到右下角。
谁有有这方面的代码或者网址。急~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

解决方案 »

  1.   

    nnd,凤凰网中间跳出来的广告真恶心~虽然一会就靠边了
      

  2.   

    看你是美女,帮你写一个吧,原理很简单,2个div,点A自己隐藏,B显示
    点B自己隐藏,A显示<div id="div1" onclick="this.style.display='none';document.getElementById('div2').style.display='';" style="background:#fff url(http://www.wholesale-retailer.com/zzz_js/old/aaa.gif) no-repeat;width:250px;height:250px; position:absolute;left:400px;top:300px;"></div>
    <div id="div2" onclick="this.style.display='none';document.getElementById('div1').style.display='';" style="background:#fff url(http://www.wholesale-retailer.com/zzz_js/old/bbb.gif) no-repeat;cursor:pointer;position:absolute;width:20px;height:200px;right:0px;bottom:0px; display:none;"></div>
      

  3.   

    谢谢你michaelzhouh
     
    也许你的代码是好用的,按照你的思路:http://www.ifeng.com/凤凰网的层是用两个层做的,但是我不大会js,它的一个层是在中间,随着滚动条的移动而移动,另一个是一个右下角。而且两个层和窗体的相对位置不变。 请问michaelzhouh,能不能劳驾你再帮一下啊。能实现我说的这两个功能,谢了。
      

  4.   

    <style type="text/css">
    <!--
    #cao {
    background-color: #3366FF;
    height: 200px;
    width: 200px;
    position: fixed;
    top:50%;
    left:50%;
    margin-left:-100px;
    margin-top:-100px;
    }
    body,td,th {
    font-size: 12px;
    text-align: center;
    }
    -->
    </style>
    <body>
    <div id="cao">CAO888</div>
    </body>
    保证好使,这个是中间的,右下角的你自己想想就能出来。应该说css就几句代码就能实现,太强大了