本文介绍了Bootstrap selectpicker搜索框的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< link rel =stylesheethref =https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.cssintegrity =sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va + PmSTsz / K68vbdEjh4ucrossorigin =anonymous>< select class =selectpickerdata-live-search =true> < option>选项1< / option> < / option> Option 2< / option>< / select>
p>
解决方案
为你生成一些HTML,所以你想要的是检查HTML,然后写一些CSS来覆盖属性由图书馆提供。
CSS:
.bs-searchbox>输入{
font-size:20px;
}
这应该适合您。希望这可以回答你的问题。
Is it possible to change font size of the search box in Bootstrap select?
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<select class="selectpicker" data-live-search="true">
<option>Option 1</option>
<option>Option 2</option>
</select>
解决方案
Bootstrap-Select generates some HTML for you, so the thing you want is to inspect the HTML and then write some CSS to override the attributes given by the library.
CSS:
.bs-searchbox > input {
font-size: 20px;
}
This should work for you. Hope this answers your question.
这篇关于Bootstrap selectpicker搜索框的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
08-14 18:01