Element-UI: How to increase icon size of buttons?

こ雲淡風輕ζ 提交于 2020-01-25 06:21:06

问题


I am simply showing a button like this:

<el-button plain circle icon="el-icon-refresh"></el-button>

But the icon inside the button is too small. Is there a way to enlarge the icon only? I am using Vue.js for my project.


回答1:


Element-ui doesn't support this by it's API. However the icon attribute places a class on i-element within a button. you are able to add a second class and add you own styling.

<el-button plain circle icon="custom-icon el-icon-refresh"></el-button>

CSS:

.custom-icon {
   font-size: 2rem;
}


来源:https://stackoverflow.com/questions/57943580/element-ui-how-to-increase-icon-size-of-buttons

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!