在Bootstrap 4上,如何从左到右打开导航栏?

时间:2019-03-20 06:38:20

标签: bootstrap-4 navigation twig collapse

在Bootstrap 4上,如何从左到右打开导航栏?

我是Bootstrap 4的新手。是否有.class来执行此操作,还是必须创建自己的CSS和JS?

当前,导航栏中的Bootstrap 4菜单从上到下打开。我希望它从右向左打开:

            {% if page.navigation_collapsible_first %}
              <div class="collapse navbar-collapse" id="CollapsingNavbarFirst">
                {{ page.navigation_collapsible_first }}
          </div>
            {% endif %}

{% block head %}
        <nav{{ navbar_attributes }}>
          {% if container_navbar %}
            <div class="container">
          {% endif %}

            <button class="navbar-toggler navbar-toggler-left" type="button" data-toggle="collapse" data-target="#CollapsingNavbarFirst" aria-controls="CollapsingNavbarFirst" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>

            {{ page.navigation_notification_first }}
            {{ page.navigation_logo }}
            {{ page.navigation_notification_second }}

            <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#CollapsingNavbarSecond" aria-controls="CollapsingNavbarSecond" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>

          {% if container_navbar %}
            </div>
          {% endif %}
        </nav>
{% endblock %}

            {% if page.navigation_collapsible_second %}
              <div class="collapse navbar-collapse" id="CollapsingNavbarSecond">
                {{ page.navigation_collapsible_second }}
          </div>
            {% endif %}

0 个答案:

没有答案