kay*_*243 3 typeahead typeahead.js twitter-bootstrap-3
据我所知,没有配置在建议框中匹配的文本样式.有什么我想念的吗?只想为匹配搜索查询的文本着色,而不是加粗.
默认情况下,twitter typeahead.js将匹配包装到<strong>标签中.因此,如果您只想更改匹配文本的颜色,您只需设置<strong>标记的样式即可:
strong {
font-weight: normal;
color: red;
}
Run Code Online (Sandbox Code Playgroud)
你可能只想<strong>在下拉列表中设置样式:
.tt-suggestion strong {
font-weight: normal;
color: red;
}
Run Code Online (Sandbox Code Playgroud)
看演示 - > http://jsfiddle.net/vrs95w3g/
还有一些亮点,你应该能够更改tagName和className,但老实说,从来没有让它工作.仍然喜欢好旧的bootstrap typeahead :)
这是一个很好的例子,如何一般地设置typeahead.js样式(边框,输入,下拉等) - > /sf/answers/1414393641/
| 归档时间: |
|
| 查看次数: |
5855 次 |
| 最近记录: |