小编Jos*_*osh的帖子

twitter bootstrap下拉列表在切换时不会切换

哦,伙计,我一直在撕扯我的头发.下拉列表4小时.

我正在使用Twitter Bootstrap.

顶部的固定导航有一个下拉,非常标准的东西.

除了下拉不会像通常那样关闭.只有在按下切换按钮时才会切换打开和关闭,而不是在按下菜单中的项目或用户在菜单外单击时(这两个都应该关闭下拉列表).

我唯一不做的就是使用iframe和bootswatch的主题.

我以前没有这样的问题,所以我觉得它可能是一个bug(升级后的bootstrap到2.1.0,jquery到今天的1.7.2).

这里的所有代码:

    <!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>test</title>
        <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
        <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
        <!-- Le styles -->
        <link href="./css/bootstrap.css" rel="stylesheet">
        <style>
            iframe {
                border: 0px;
                height: 95%;
                left: 0px;
                position: absolute;
                top: 50px;
                width: 100%;
            }
        </style>
    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="brand" target="mainframe" href="./home.html">
                       Brand
                    </a>
                    <ul class="nav">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" …
Run Code Online (Sandbox Code Playgroud)

iframe jquery twitter-bootstrap drop-down-menu bootswatch

5
推荐指数
1
解决办法
1万
查看次数