如何用sass格式设置由simple_form生成的选择元素?

我有这个simple_form:

.reveal.doubt id="doubt-material-#{material.id}" data-reveal=true
  button.close-button data-close=true aria-label="Close reveal" type="button"
    span aria-hidden="false" ×
  h5 #{t 'students.materials.index.questions.button'}
  p #{t 'students.materials.index.questions.form_explanation'}
  = simple_form_for [:student,trail,component,material,material_student,doubt],html: {id: "doubt" },remote: true do |f|
    = f.input :recipient,collection: [['contato@witseed.com','Atendimento a cliente'],['tec@witseed.com','Suporte técnico']],value_method: :first,label_method: :second,label: "#{t 'students.materials.index.questions.form_send_email'}",include_blank: "#{t 'students.materials.index.questions.form_blank_line'}",required: true,input_html: {class: 'custom_select'}
    = f.input :question,as: :text,label: true,label: "#{t 'students.materials.index.questions.form_message'}",input_html: { rows: "2" }
    = f.submit "#{t 'students.materials.index.questions.form_send_button'}",class: 'button primary-button-active'

它生成以下html:

如何用sass格式设置由simple_form生成的选择元素?

哪个生成以下表格:

如何用sass格式设置由simple_form生成的选择元素?

现在,我想为下拉菜单设置样式,但是我无法在代码中找到select元素。在检查中,我很清楚它在哪里。

我尝试添加:

.input
  position: relative
  select
    background-color: white
    &#doubt_recipient
      border: 2px solid red
      padding: 5px

但是失败了。

有人有什么建议吗?非常感谢。

jieci1981 回答:如何用sass格式设置由simple_form生成的选择元素?

实际上只是在终端中运行以下行:

bundle exec rake assets:precompile

并呈现CSS样式。

最后我刚刚在id处添加了样式:

#doubt_recipient
  border: 2px solid red
  padding: 5px
  background-color: white
本文链接:https://www.f2er.com/3048384.html

大家都在问