问答详情
源自:-

bootstrap 关于list-group的使用

在pc中显示的是list-group,随着屏幕的变小,在手机中该list-group就缩小变成一个button,点击的时候出现list 请问该怎么实现

提问者:慕筱飞 2015-03-26 16:10

个回答

  • CloudBlack
    2015-12-15 11:57:46

    这个是navbar,不要用list-group写。navbar有固定的写法:

     <nav class="navbar navbar-default" id="header-menu">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" data-toggle="collapse" data-target=".collapse" class="navbar-toggle">
                        <span class="sr-only">slide</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a href="#" class="navbar-brand">
                        <img src="images/logo.png" alt="logo" title="logo" />
                    </a>
                </div>

                <div class="collapse navbar-collapse">
                    <ul class="nav navbar-nav" role="menu" id="myMenu">
                        <li><a href="#">option</a></li>
                        <li><a href="#">option</a></li>
                        <li><a href="#">option</a></li>
                        <li><a href="#">option</a></li>
                    </ul>
                </div>

    </nav>