html - 选择标签的设置宽度不起作用

标签 html css input drop-down-menu

我已经尝试了几乎所有可以在 stackoverflow 上找到的东西 例如

<select style="width:50px;">
//all my select options and stuff would be here

&

<select class="pleasekillme">
//all my select options and stuff would be here

<style>
.pleasekillme {
width: 50px;
}
</style>

&

<select width="50">
//all my select options and stuff would be here

我又试了几次,但什么都不奏效,请帮忙。

任何帮助将不胜感激

最佳答案

对我来说很好用

select {
 width: 500px;
}

这是一个简单的 JsFiddle 工作原理:https://jsfiddle.net/un67fLxa/

关于html - 选择标签的设置宽度不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39463139/

相关文章:

html - 输入字段建议在 Firefox 上未正确显示

javascript - 循环确定 selectedIndex 不起作用?

javascript - 动态更改字体大小时到基线的恒定距离 - html - 文本元素

jquery - Div 未在 FireFox 中正确定位

html - html 中的 ol 中不能有 ul

html - 中心 Bootstrap 按钮

css - 固定 Bootstrap 轮播的定位?

javascript - 输入框在 Enter 时重置页面而不是运行函数

html - &lt;input type ="number"/> with a custom step "n"but allow decimals

javascript - Angular - 在一页上获取输入并使用同一 Controller 在第二页上显示值