dorisdong0514 2012-09-04 04:08
浏览 37

jquery菜单没有出现在包装前面,背面颜色包含带背景图像的div

The problem that I am facing, is that the circular menus using jquery, after opening I can't see all of the choices in the scree, I've got two menus, the first appears on top of the wrap, and the other appear below the first menu. What a I'm trying to do is, when I do mousehover to the first menu, I want to view all the choices, and the wrap element stretches to englobe all the choices, I need a scrollbar to appear so I can move up a see the choices. Here is the code. default.css

.socials {
display:block;
width:32px;
height:32px;
background:url(../img/socials/share.png) no-repeat;
cursor:pointer;
position:relative;
}

.nature {
display:block;
width:150px;
height:150px;
background:url(../img/nature/img1.png) no-repeat;
cursor:pointer;
position:relative;


}



.socials, .nature {
margin:0 auto;
}

.socials {
margin-bottom:50px;
}

ul.reset,
ul.reset li {
display:block;
list-style:none;
padding:0;
margin:0;

}

ul.reset li {
position:absolute;
}

ul.reset li a {
outline:none;
}

#content {
margin:100px auto 0;
width:560px;
}


a {
color:#fff;
}

a img {
border:none;
}

the style.css

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0 none;
font-family: inherit;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0 none;
padding: 0;
vertical-align: baseline;
}
body {
background-color: #000000;

}
 #wrap {
background-color:#FECC80;
margin:25px auto;
width: 940px;
min-height:560px;


 }
.centered {
 margin:25px auto;
width: 940px;
min-height:560px;
background:url("../Images/logo.png") no-repeat center center;

 position:fixed;
 }

/*menu em cima*/
nav {width: 100%;
position:fixed;
list-style: none;
padding: 0;
margin: 0;
top:0;

 }


    nav ul {
        list-style: none;
        margin:0;
        padding:0;
        display: table;

        width: 100%;
    }
    nav li {
        z-index:10;
        text-align: center;
        display: table-cell;
               width: 120px
    }
    nav a {
             opacity: 0.5;
   filter: alpha(opacity=50);
        color: #fff;
        text-decoration: none;
        padding: 5px 10px ;
        height: 30px;
        line-height: 20px;
        display: block;
        text-align: center;
        background: #D98134;
        border-right:1px solid white;

    }

    nav  a:hover {
          opacity:1;
 filter: alpha(opacity=100);
background-color: #D98134;
}



 /*menu de baixo*/


 nav2 {width: 100%;
position:fixed;
list-style: none;
padding: 0;
margin: 0;
bottom:0;

}


    nav2 ul {
        list-style: none;
        margin:0;
        padding:0;
        display: table;

        width: 100%;
    }
    nav2 li {
        z-index:10;
        text-align: center;
        display: table-cell;
               width: 120px
    }
    nav2 a {
             opacity: 0.5;
  filter: alpha(opacity=50);
        color: #fff;
        text-decoration: none;
        padding: 5px 10px ;
        height: 30px;
        line-height: 20px;
        display: block;
        text-align: center;
        background: #D98134;
        border-right:1px solid white;

    }

    nav2  a:hover {
          opacity:1;
 filter: alpha(opacity=100);
background-color: #D98134;
}

And here goes the part from produtos.php where i have the problems

<div class="centered">
</div>

<div class="nature" >
        <ul class="reset" >
            <li><a href="#"><img src="../img/nature/img2.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img3.png" alt="" /></a></li>

        </ul>           
    </div>




    <div class="nature"  >
        <ul class="reset">
            <li><a href="#"><img src="../img/nature/img2.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img3.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img4.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img2.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img3.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img4.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img2.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img3.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img4.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img2.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img3.png" alt="" /></a></li>
            <li><a href="#"><img src="../img/nature/img4.png" alt="" /></a></li>

        </ul>           
    </div>
</div>

</div>

You can view the site working in http://ocafe.pt/Teste/produtos.php and view in first hand the problem.

  • 写回答

1条回答 默认 最新

  • dtdfj08626 2012-09-04 07:06
    关注

    I have been playing with some ideas:

    for starters, your fixed attribute on the .centered div is mucking you around big time.

    Here is a possible solution at: http://jsfiddle.net/webwarrior/LSn6F/34/

    Changed some css, and added some elements:

    <div id="wrap2"></div>
    
     <div id="wrap">
    
    <div class="centered">
    </div>
    
    <div class="nature">
                <ul class="reset" style="display: block; z-index: 50; opacity: 0; ">
                    <li style="top: 0px; left: 0px; z-index: 50; "><a href="#"><img src="http://ocafe.pt/img/nature/img2.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img3.png" alt=""></a></li>
    
                </ul>            
            <a class="trigger" style="display: block; position: absolute; z-index: 1; top: 0px; left: 0px; width: 100%; height: 100%; "></a></div>
    
    
    
    
            <div class="nature">
                <ul class="reset" style="display: block; z-index: 50; opacity: 0; ">
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img2.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img3.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img4.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img2.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img3.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img4.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img2.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img3.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img4.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img2.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 50; "><a href="#"><img src="http://ocafe.pt/img/nature/img3.png" alt=""></a></li>
                    <li style="top: 0px; left: 0px; z-index: 49; "><a href="#"><img src="http://ocafe.pt/img/nature/img4.png" alt=""></a></li>
    
                </ul>            
            <a class="trigger" style="display: block; position: absolute; z-index: 1; top: 0px; left: 0px; width: 100%; height: 100%; "></a></div>
    </div>
    

    CSS:

    #wrap2 {
        background-color:#FECC80;
        margin:25px auto;
        width: 940px;
        min-height:560px;
        position: absolute;
        top: 20px;
        left: 50%;
        margin-left: -25%;
    }
    #wrap {
        background-color:#FECC80;
        margin:25px auto;
        width: 940px;
        min-height:560px;
        position: absolute;
        top: 200px;
        left: 50%;
        margin-left: -25%;
        overflow: visible;
    }
    .centered {
        margin:25px auto;
        width: 940px;
        min-height:560px;
        background:url("http://ocafe.pt/Images/logo.png") no-repeat center center;
        overflow: auto;
        position: absolute;
        position: absolute;
        top: -25%;
        left: 0%;
    
    }
    

    hth

    we will get there after a bit of fiddling...

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题