html选择选项分隔符 [英] html select option separator
本文介绍了html选择选项分隔符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
新窗口
新选项卡
-----------
保存页面
------------
退出
解决方案
禁用选项方法似乎看起来最好并且得到最好的支持。我还列举了一个使用optgroup的例子。
optgroup(这种方式很吸引人):
< select> < OPTGROUP> <选项>首先< /选项> < / OPTGROUP> < optgroup label =_________> <选项>第二个< /选项> <选项>第三< /选项> < / optgroup>< / select>
$ b 禁用选项更好一点):
< select> <选项>首先< /选项> < option disabled> _________< / option> <选项>第二个< /选项> < / option>< / select>
$ b
如果你想要真的很花哨,可以使用水平的unicode盒子绘制字符。这很性感!
(BEST OPTION!)
< select> ; <选项>首先< /选项> < option disabled>──────────< / option> <选项>第二个< /选项> < / option>< / select>
$ b
How do you make a separator in a select tag?
New Window
New Tab
-----------
Save Page
------------
Exit
解决方案
The disabled option approach seems to look the best and be the best supported. I've also included an example of using the optgroup.
optgroup (this way kinda sucks):
<select>
<optgroup>
<option>First</option>
</optgroup>
<optgroup label="_________">
<option>Second</option>
<option>Third</option>
</optgroup>
</select>
disabled option (a bit better):
<select>
<option>First</option>
<option disabled>_________</option>
<option>Second</option>
<option>Third</option>
</select>
And if you want to be really fancy, use the horizontal unicode box drawing character. It's sexy!
(BEST OPTION!)
<select>
<option>First</option>
<option disabled>──────────</option>
<option>Second</option>
<option>Third</option>
</select>
这篇关于html选择选项分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文