我可以为& lt; select& gt;设置样式吗?元素以显示列? [英] Can I style a <select> element to show columns?
问题描述
我正在尝试在< select>中创建基于列的列表.具有multi = multiple的元素-我想在菜单中看到的是:
Opt1 Opt5 Opt9Opt2 Opt6 Opt10Opt3 Opt7 Opt11Opt4 Opt8 Opt12
这可能吗?我当然愿意在jQuery中做到这一点,但更喜欢CSS.
绝对有可能.
这个类似的问题中建议了几个选项.
这个非常受欢迎的问题进一步扩大了范围,增加了自动完成功能./p>
如果您在Google上搜索"jquery multi-column dropdownlist",您可以找到更多选择.
BTW,"多个
"属性指定用户是否可以选择列表中的多个项目,而不指定下拉列表中是否显示多个列.
I'm trying to create a column-based list within a <select> element with multiple=multiple - what I'd like to see in the menu is:
Opt1 Opt5 Opt9
Opt2 Opt6 Opt10
Opt3 Opt7 Opt11
Opt4 Opt8 Opt12
Is this possible? I'm certainly open to doing this in jQuery but would prefer CSS.
It is most definitely possible.
There are several options suggested in this similar SO question.
And this very popular question takes it a bit further, adding autocomplete.
And if you google "jquery multi-column dropdownlist" you can find several more choices.
BTW, the "multiple
" attribute specifies whether the user can select multiple items in the list, not whether there are multiple columns displayed in the dropdownlist.
这篇关于我可以为& lt; select& gt;设置样式吗?元素以显示列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!