这似乎很简单,但我甚至无法找到的东西告诉我,这不是可能的,更不用说如何做到这一点.
我有一个使用扩展/多个selects 的页面,我似乎无法控制选项的高度.他们看起来很舒服.在Firefox中,optionin height和line-heightboth的CSS值似乎都有所需的效果padding,但在Chrome 8或Safari 5中却没有.我错过了什么?这是我的代码示例.如果有一些我不知道的重要价值,我会投入任何可能影响期权的东西.
body, input, select, checkbox {
font-family:'Avenir Lt Std',AppleGothic,'century gothic',Verdana,sans-serif;
font-size: 15px;
font-weight:200;
line-height: 18px;
}
input, select {
color:#4c2a18;
border: 1px solid #cfc8b4;
background-color:#ffffff;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
margin:0;
}
option {
height: 35px;
padding:5px;
line-height: 35px;
}Run Code Online (Sandbox Code Playgroud)
<select size="5">
<option value="">This is option 1</option>
<option value="">Option 2</option>
<option value="">Just trying to show how the line height thing works.</option>
</select>Run Code Online (Sandbox Code Playgroud)
你可以在这里查看它.