html - 使 simple_form 文本字段透明

标签 html css simple-form

嘿,我希望 simple_form 的输入文本字段是透明的。这意味着我希望它融入页面的背景。有什么办法吗?什么是用于设置 simple_form 样式的好资源?

这是现在没有 css 的 html

<%= simple_form_for @reason do |f| %>
    <%= f.input :why, label: 'Tell us about it' %>
    <%= f.input :name, label: 'Name (doesn\'t have to be your real name)' %>
    <%= f.input :location %>
    <%= f.button :submit, "Put it out there", class: 'col-xs-offset-3 col-xs-6 btn btn-lg submit' %>
<% end %>

我想做的是让用户在回答表单问题时看起来好像是在直接在页面背景上写文本

最佳答案

尝试将类或 ID 添加到您的输入字段。

例子:

HTML -> <input class="transparent_background" type="text" name="" value="">

CSS -> .transparent_background { background: transparent; }

希望这有助于您入门....除此之外,如果您不更具体和/或向我们提供您目前拥有的代码,则很难提供任何帮助...

关于html - 使 simple_form 文本字段透明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35182126/

相关文章:

html - Css 表格单元格规则和自动宽度溢出

html - 两个具有静态宽度的 DIV 1,其他的 fliud,但是如何让正确的 div 堆叠在@断点下?

css - 如何固定 body 上的填充物

ruby-on-rails - SimpleForm maxlength 扩展的工作原理

ruby-on-rails - 在 simpleform + Rails 中的 bootstrap 中左对齐 "remember me"复选框

ruby - simple_form 的 collection_radio_button 和自定义标签类

python - 使用 Pandas read_html 时遇到问题

css - CSS 页眉周围的空格

HTML 表格布局 3x2

用于表单布局的 HTML/CSS 显示表