Chrome无法识别SELECT选项的高度(jQuery& amp; CSS) [英] Chrome does not recognize height for SELECT option (Both jQuery & CSS)

查看:138
本文介绍了Chrome无法识别SELECT选项的高度(jQuery& amp; CSS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在chrome浏览器中使用css或jQuery设置选择选项的高度,而同一段代码可以在Firefox中正常工作.

I am unable to set height for select options with css or jQuery in chrome browser , while the same piece of code works in Firefox without any issue.

CSS

#select-jqry option{
    height: 50px;
}

HTML

<select id='select-jqry'>
    <option>One</option>
    <option>Two</option>
    <option>Three</option>
    <option>Four</option>
</select>

即使我尝试使用jQuery,

Even I tried with jQuery,

$('#select-jqry option').css('height','50px'); 

即使填充也不起作用

演示

推荐答案

根据 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆