【问题标题】:How to line drop down menu items horizontally instead of the vertical form如何水平排列下拉菜单项而不是垂直形式
【发布时间】:2019-06-29 13:50:00
【问题描述】:

我设计了一个导航栏,其中有一些下拉菜单项都在垂直线上,我如何将它们放置在水平线上或并排? 我的下拉菜单的代码.... 登录

  •                   Log In Via:
                      <div class="social-button">
                        <a href="#" class="btn btn-fb"><i class="fa fa-facebook"aria-hidden="true">Facebook</i></a>
                        <a href="#" class="btn btn-tw"><i class="fa fa-twitter" aria-hidden="true">Twitter</i></a>
                        <a href="#" class="btn btn-ins"><i class="fa fa-instagram" aria-hidden="true">Instagram</i></a>
    
                      </div>
    
                  </div>
                </li>
              </ul>
            </li> 
    
  • 【问题讨论】:

      标签: html drop-down-menu bootstrap-4


      【解决方案1】:
          <div class="social-button d-flex flex-row">
             <a href="#" class="btn btn-fb"><i class="fa fa-facebook"aria-hidden="true">Facebook</i></a>
             <a href="#" class="btn btn-tw"><i class="fa fa-twitter" aria-hidden="true">Twitter</i></a>
             <a href="#" class="btn btn-ins"><i class="fa fa-instagram" aria-hidden="true">Instagram</i></a>
          </div>
      

      如果您使用的是 Bootstrap 4

      此外,看看 flex,这真的很重要 :) https://getbootstrap.com/docs/4.1/utilities/flex/

      【讨论】:

      • 非常感谢。它现在可以使用,将检查 flex
      • 不客气,请点击绿色“V”验证答案:)
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-02
      • 1970-01-01
      • 2019-09-22
      • 2022-11-26
      • 2011-01-08
      相关资源
      最近更新 更多