Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet Explorer CSS_Css_Internet Explorer 9_Drop Down Menu - Fatal编程技术网

Internet Explorer CSS

Internet Explorer CSS,css,internet-explorer-9,drop-down-menu,Css,Internet Explorer 9,Drop Down Menu,我在一个网站上有一个下拉菜单,它可以在除Internet Explorer之外的所有浏览器上完美运行。有没有办法只为internet explorer关闭它?我试着用 -ms-display:none; (我不知道这是否真的有效)但这是我唯一的想法。有什么想法吗 <div style="float:left;"> <ul id="nav" class="dropdown dropdown-linear dropdown-columnar"> <a href

我在一个网站上有一个下拉菜单,它可以在除Internet Explorer之外的所有浏览器上完美运行。有没有办法只为internet explorer关闭它?我试着用

-ms-display:none;
(我不知道这是否真的有效)但这是我唯一的想法。有什么想法吗

<div style="float:left;">
<ul id="nav" class="dropdown dropdown-linear dropdown-columnar">
    <a href="http://www.redballoontoystore.com/index.php"><li>Home</li></a>
    <a href="http://www.redballoontoystore.com/products/index.php"><li class="dir">Toys
        <ul>
            <li class="dir"><a href="http://www.redballoontoystore.com/buckyballs/index.php">Buckyballs</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/calicocritters/index.php">Calico Critters</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/games/index.php">Games</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/magnetics/index.php">Magnetics</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/outdoor/index.php">Outdoor</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/playmobil/index.php">Playmobil</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/quercetti/index.php">Quercetti</a></li>
            <li class="dir"><a href="http://www.redballoontoystore.com/science/index.php">Science</a></li>
        </ul>
    </li></a>
    <a href="http://www.redballoontoystore.com/calendar/index.php"><li>Calendar</li></a>
    <a href="http://www.redballoontoystore.com/aboutus/index.php"><li>About Us</li></a>
    <a href="http://www.redballoontoystore.com/storeinfo/index.php"><li>Store Info</li></a>
    <a href="mailto:management@redballoontoystore.com"><li>Contact Us</li></a>
</ul>

您可以尝试使用条件注释来避免IE执行代码:

<![if !IE]>

Your code

<![endif]>

你的代码

IE css黑客也总是存在。虽然它们并不可取,但如果这只是一个非常快速和肮脏的事情,并且您需要针对IE7及以下版本,您可以在属性前面放置一个*

例如:

div.box {
    display: inline-block;
    *display: inline;
}

这将只在IE7及以下版本中显示内联。

您可能希望在菜单中包含CSS。如果人们能看到你的尝试,他们甚至可以告诉你如何让它发挥作用。你在本地查看吗?我遇到了一个内联网站点的问题,该站点的菜单仅在IE中中断。结果表明,IE 9自动假定所有内联网站点都应在兼容模式下查看,从而中断了我的菜单。关闭它,为我解决了这个问题。它不是本地的,兼容模式是off。我还有一些样式表只是用于下拉菜单,但我不想全部粘贴。如果这没有改变Firefox的代码,那就太棒了。当我尝试它的时候,它是为explorer做的,但后来我的firefox版本也被弄乱了。你刚才给我的firefox、chrome和safari的代码是什么?据我所知,条件注释只有IE支持,你可以尝试使用:你的代码是的。。。IE9也把事情搞砸了
div.box {
    display: inline-block;
    *display: inline;
}