CSS问题:如何控制z-index? [英] CSS Problem: How to control the z-index?

查看:122
本文介绍了CSS问题:如何控制z-index?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的网站上有一个菜单,下面有一个自动播放滑块,菜单上有很长的子菜单,打开菜单时出现的问题是我看不到子菜单的整个列表.移动的滑块将其隐藏.它刚出现在菜单上.
我尝试编辑CSS的z-index属性,但仍然存在相同的问题.
我想要滑块上的子菜单.

这是图片:

< img> http://im24.gulfup.com/2012-07-31/1343690359371.png</img>


这是菜单的设计代码

Hi guys,

I have in my website a menu and down to it there is an auto-playing slider, the menu has long sub-menus, and the problem when I open the menu I cannot see the whole list of sub-menus; the moving slider hides it. It just come over the menu.
I tried to edit the CSS, the z-index attribute, but still the same problem.
I want the sub-menu over the slider.

Here is the picture:

<img>http://im24.gulfup.com/2012-07-31/1343690359371.png</img>


Here are the design code of menu

<div id="menus" style="z-index: 10px;">
        <ul class="menus">
            <li><a href="index.aspx"><span>Home</span></a></li>
            <li><a class="parent"><span>Educational Plan</span></a>
                <ul>
                    <li><a href="#" class="parent"><span>Education Faculty</span></a>
                        <ul>
                            <li><a href="#"><span>Curricula & Teaching Methods Dep.</span></a></li>
                            <li><a href="#"><span>Educational Mgmt. Supervision Dep.</span></a></li>
                            <li><a href="#"><span>Islamic Studies Dep.</span></a></li>
                            <li><a href="#"><span>Educational Mgmt. Supervision Dep.</span></a></li>
                            <li><a href="#"><span>Islamic Studies Dep.</span></a></li>
                            <li><a href="#"><span>Lingustics Dep.</span></a></li>
                            <li><a href="#"><span>Literatures Dep.</span></a></li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>



这是滑块的设计代码



and this is the design code of slider

<div id="prew_img" style="z-index: 3px;">
            <ul class="round">
                <li>
                    <img src="images/header1.jpg" alt="" /></li>
                <li>
                    <img src="images/header2.jpg" alt="" /></li>
                <li>
                    <img src="images/header3.jpg" alt="" /></li>
                <li>
                    <img src="images/header4.jpg" alt="" /></li>
                <li>
                    <img src="images/header5.jpg" alt="" /></li>
                <li>
                    <img src="images/header6.jpg" alt="" /></li>
            </ul>
        </div>

推荐答案

开始

问题仅在于px属性,我设置了z -index:10,就可以了!
The problem was only with px property, I set z-index:10, and it worked!


这篇关于CSS问题:如何控制z-index?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆