select 宽度设定

  • Post author:
  • Post category:其他



在使用 Select时,有时候需要固定宽度,有时候需要自适应,下面说下要设定固定宽度时要注意的地方:

控件设定宽度一般是直接指定width属性即可,但 Select设定固度是使用style=”width:n”的形式设定,如果只设置width属性,则 Select的宽度还是会随下面选择项的宽度变化而变化的,如:



<


select width


=





20px





>




<