html - HTML:如何更改按钮的大小,使其与上面的图标大小相同?
问题描述
我在https://www.css3buttongenerator.com的帮助下创建了一个按钮。我现在正在尝试调整我的 html 上的按钮大小,以便按钮上的图标完全适合它。可以这么说,我希望它们的尺寸相同。但那个网页并没有真正帮助我。
这就是我的代码的样子。 HTML:
<button class="butn"><i class="fa fa-question-circle-o" id="AnzeigeerstellenHilfe"></i></button>
CSS:
.butn {
color: #859f38;
background-color:transparent;
background-size: 30px !important;
width: 22px !important;
height: 22px !important;
text-decoration: none;
border: none;
outline: 0 !important;
}
我一直在玩 .css 上的值并更改/添加东西,但到目前为止没有成功。我该怎么做?
解决方案
尝试:
<button class="butn"><i class="fa fa-question-circle-o" id="AnzeigeerstellenHilfe"></i></button>
.butn {
color: #859f38;
background-color:transparent;
text-decoration: none;
border: none;
outline: 0 !important;
}
或者如果您想调整图标大小,请使用@sao 的答案
推荐阅读
- javascript - Vue.js – 如何使用 Vuetify 构建像 Doodle 这样的表格?
- php - 如何在 php 中按不同语言(西班牙语、法语、俄语等)的字母顺序对数组进行排序?
- firebird - Firebird 为 sysdba 用户更改默认密码后不会忘记默认密码
- php - 从 PHP 数组中提取值并回显来自 Curl 脚本的 HTML 页面多维响应
- python - Python:请求 ID 线程本地日志记录
- sql - 如何将最小值和最大值定义为 postgresql 字段的范围?
- ios - 我可以在不上传新应用版本的情况下添加新的应用内购买产品吗?
- powerbi - 根据另一个表中的两列求和
- python - 通过 Python 中的函数式编程制作列表
- html - 我可以使此复选框隐藏/显示同一部分中但在不同类下的元素吗?