[英]How to add icon in a button in framework7?
I'm a beginner with framework7.我是framework7的初学者。 I'm trying to insert an icon in a button element.
我正在尝试在按钮元素中插入一个图标。 I'd like to set the icon on the left of the label.
我想设置标签左侧的图标。 I've achieved my purpose partially.
我已经部分达到了我的目的。
<a class="button button-fill button-round button-small color- gray" href="#" id="add_field_button" style="float: left;"><i class="material-icons ">add_circles</i>Add</a>
I've put a demo here.我在这里放了一个演示。
https://jsfiddle.net/ad72krqv/1/ https://jsfiddle.net/ad72krqv/1/
Thank you in advance先感谢您
Add this CSS添加这个 CSS
.button {
display: flex;
justify-content: center;
align-items: center;
}
.button > i {
width: 24px;
margin-right: 5px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.