![](/img/trans.png)
[英]I am using the select form in from bootstrap v4.5. but after i select an option the select option box becomes smaller
[英]I am using select tag in bootstrap and I am using css for changing the background of select box
我在引导程序中使用select
标签,并且在使用CSS更改选择框的背景。 这是一个好习惯吗? 或引导程序中有任何内置类可以更改background-color
吗?
的HTML
<select class="select">
<option>10</option>
<option>20</option>
<option>30</option>
</select>
的CSS
.select{
background-color: #fff;
}
是的,您可以使用类为选择框应用背景。 只要您的代码是W3标准版,就不认为这是不好的做法。
这也是用于引导程序的带有许多功能的引导框
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.