更改“选项"的高度只用 css [英] change the height of "option" only with css
本文介绍了更改“选项"的高度只用 css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,在代码中,选项"太低了,我只想用css(没有javascript)让它更高.
For example,in the code,"option"is too low,I want to make it higher only with css(no javascript).
<select>
<option>Beijing</option>
<option>ShangHai</option>
<option>WuHan</option>
</select>
推荐答案
由于 (和
)元素由浏览器呈现作为下拉列表,不幸的是您无法设置它们的样式,因为它们的样式仅由浏览器本身控制.
Since that <option>
(and <select>
) elements are rendered by the browser as a dropdown list, unfortunately you cannot style them, because their style is only controlled by the browser itself.
这篇关于更改“选项"的高度只用 css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文