更改下拉菜单的选项高度 [英] Change the Option height of dropdown
本文介绍了更改下拉菜单的选项高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用CSS在两个选项之间更改高度?
Is that possible to change height between two options using CSS?
请参见说明性示例.现金与现金之间的高度信用卡选项
See the illustrative ex. Height between Cash & Credit Card option
注意:我仅支持 Chrome
推荐答案
没人记得 < optgroup>
s 了吗?很少使用,但在每种浏览器中都受支持.
Does no one remember <optgroup>
s anymore? Rarely used, but nonetheless supported in every browser.
<select>
<optgroup label="Cash">
<option>Cash</option>
</optgroup>
<optgroup label="Other">
<option>Credit Card</option>
<option>Credit Note (R)</option>
<option>Gift Voucher</option>
<option>Cheque</option>
</optgroup>
</select>
这篇关于更改下拉菜单的选项高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文