Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用出色的表单构建器插件“formastic”来构建表单。虽然它是相当丑陋的。如何设置样式?我通过文档找到的信息很少。注意:我使用最新的 1.2.3。使用 ruby 1.8.7 和 rails 3.0.3。
如果您使用了 formtastic 生成器(rails generate formtastic:install),那么您在 public/stylesheets 子目录中有两个 CSS 文件,分别称为 formtastic.css 和 formtastic_changes.css。查看第一个以了解 formtastic 如何设置默认样式,然后在 formtastic_changes.css 中覆盖这些样式。