最新版本号[免费下载]

ionic按钮/Buttons

作者:本站编辑 发布时间:2015-11-24 来源:本站原创 点击数:

Ah, the Button, an essential part of any mobile experience. Like the Header, they come in the full spectrum of Ionic's default colors.

By default a button has display: inline-block applied. Other options include block buttons for a full width.

<buttonclass="button">   Default </button><buttonclass="button button-light">   button-light </button><buttonclass="button button-stable">   button-stable </button><buttonclass="button button-positive">   button-positive </button><buttonclass="button button-calm">   button-calm </button><buttonclass="button button-balanced">   button-balanced </button><buttonclass="button button-energized">   button-energized </button><buttonclass="button button-assertive">   button-assertive </button><buttonclass="button button-royal">   button-royal </button><buttonclass="button button-dark">   button-dark </button>

Block Buttons

Adding button-block to a button applies display: block display. A block button will however go 100% of its parent's width. In the example, the button's containing content element also has padding applied, so there is some breathing room between the edge of the device and the buttons.

<buttonclass="button button-block button-positive">   Block Button </button>

Full Width Block Buttons

Adding button-full to a button not only applies display: block, but also removes borders on the left and right, and any border-radius which may be applied. This style is useful when the button should stretch across the entire width of the display. Additionally, the button's parent element does not havepadding applied.

<buttonclass="button button-full button-positive">   Full Width Block Button </button>


本文责任编辑: 加入会员收藏夹 点此参与评论>>
复制本网址-发给QQ/微信上的朋友
上一篇文章:ionic底部/Footer
下一篇文章:Different Sizes
AI智能听书
选取音色