Bootstrap horizontal dropdown-menu?

后端 未结 1 822
野的像风
野的像风 2020-12-18 09:40

I\'d like a bootstrap dropdown menu where the links are horizontal. Unfortunately, I\'m having trouble with getting the width correct. The only way I can seem to make it hap

相关标签:
1条回答
  • 2020-12-18 10:34

    Your Problem solved Horizontal List

    html


        <div class="btn-group">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Drop it</button>
        <ul class="dropdown-menu" role="menu">
            <li> <a href="http://google.com">Google</a>
    
            </li>
            <li> <a href="http://facebook.com">Facebook</a>
    
            </li>
        </ul>
    </div>
    

    css


     @import url('http://getbootstrap.com/dist/css/bootstrap.css');
     .dropdown-menu > li {
        display: inline-block;
        float:left;
    }
    .open > ul {
        display: inline-flex !important;
    }
    
    0 讨论(0)
提交回复
热议问题