2015-06-21 78 views
1

当我在工具栏上添加两个以上的按钮时,工具栏上的按钮没有出现,我想在工具栏上添加多个按钮 。 我想添加像这个图像的工具栏上的按钮。ONSEN-UI在工具栏上添加三个以上的按钮

enter image description here

<ons-toolbar fixed-style> 
    <div class="left"> 
    <ons-toolbar-button ng-click="menu.toggle()"> 
     <ons-icon style="color:#fff" icon="ion-navicon-round" size="28px" fixed-width="false"></ons-icon> 
    </ons-toolbar-button> 
    </div> 


    <div class="right"> 
    <ons-toolbar-button> 
     <button style="color:#fff" class="button button--quiet" ng-click="shareAnywhere()"><i class="ion-android-share-alt"></i> 
     </button> 
    </ons-toolbar-button> 
    </div> 

</ons-toolbar> 

回答

1

你可以写所有你想要的位置类的div里面的按钮:

<ons-toolbar> 
    <div class="left"> 
     <ons-toolbar-button> A </ons-toolbar-button> 
     <ons-toolbar-button> B </ons-toolbar-button> 
    </div> 

    <div class="centre"> 
     Title 
    </div> 

    <div class="right"> 
     <ons-toolbar-button> C </ons-toolbar-button> 
     <ons-toolbar-button> D </ons-toolbar-button> 
     <ons-toolbar-button> F </ons-toolbar-button> 
    </div> 
</ons-toolbar> 

这里检查它:http://codepen.io/frankdiox/pen/oXYXaP

希望它能帮助!

相关问题