如何在菜单折叠中隐藏div

时间:2015-05-30 11:31:20

标签: angularjs angular-ui angular-ui-bootstrap angularjs-bootstrap

我终于让崩溃菜单适用于Bootstrap Angular UI。但是我仍然无法弄清楚如何隐藏“hide-mobile”类的div并在移动视图中显示“show-mobile”类。

目前,它显示了两者。我应该使用@media查询还是有更好的方法来隐藏hide-mobile div?

    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="navbar-header">
                    <button type="button" class="navbar-toggle" ng-init="navCollapsed = false" ng-click="navbarCollapsed = !navbarCollapsed">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                    </button>
                    <div class="hide-mobile">
                        <a class="navbar-brand" href="#">
                            Web-LOGO
                        </a>
                    </div>
                    <div class="Show-mobile">
                        <a class="navbar-brand" href="#">
                            Mobile-LOGO
                        </a>
                    </div>
            </div>

            <div class="collapse navbar-collapse" collapse="navbarCollapsed">
                    Awesome Mobile Links
            </div>
    </nav>

1 个答案:

答案 0 :(得分:0)

代替hide-mobileshow-mobile尝试hidden-xsvisible-xs