引导程序下拉按钮不显示列表项

时间:2020-04-18 19:03:57

标签: css twitter-bootstrap bootstrap-4

当我按下按钮时,以下代码不显示列表项,而是列表项在导航栏中显示为标题。

<nav id="header-nav" class = "navbar navbar-default">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapsable-nav">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a href = "#" class="navbar-brand"><h1>Food,LLC</h1></a>
                </div>
                <div id="collapsable-nav" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li><a href="#">Sandwich</a></li>
                        <li><a href="#">Pizza</a></li>
                        <li><a href="#">Pasta</a></li>
                    </ul>
                </div>
            </div>
        </nav>

0 个答案:

没有答案