我需要在我的下拉列表中添加水平线。我研究并发现了这种方式:
<select>
<option>First</option>
<option disabled>──────────</option>
<option>Second</option>
<option>Third</option>
</select>
问题是我使用 Codeigniter form_dropdown() 并且无法在我的代码中插入行。你能帮我在下面的代码中插入水平线吗?
$options = array(
'' => 'Select Size',
'' => '-----------', //does not work
'small' => 'Small Shirt',
'med' => 'Medium Shirt',
'' => '-----------', // does not work
'large' => 'Large Shirt',
'xlarge' => 'Extra Large Shirt',
);
echo form_dropdown('shirts', $options, 'set_value('shirts')');