首页 > 解决方案 > 如何使用 bootstrap 4 制作这种表单选择菜单?

问题描述

我正在尝试更改自定义引导程序默认表单选择器箭头。有什么方法可以更改表单中的默认箭头并添加此<i class=" fas fa-caret-down"></i>插入符号图标?

标签: twitter-bootstrapform-helpersbootstrap-form-helper

解决方案


.custom-select是将此图标添加为background

因此,您可以下载SVG并覆盖该类,它应该可以工作。

我相信有比这更好的方法。但这是我目前唯一能想到的方法。

在此处输入图像描述

.custom-select {
    background: url('../images/caret-down-solid.svg') no-repeat right .75rem center/8px 10px;

}

推荐阅读