按钮的代码是:
<%= mail_to "example@email.com", 'Request more info about holiday extensions here', Subject: "Hi Please include your name and email address", class: 'button-email' %>
&#13;
如何添加br标签,以便按钮文本显示在2行上,从&#34; 关于&#34;
请求更多信息
HOLIDAY EXTENSIONS HERE
提前致谢!
答案 0 :(得分:4)
mail_to可以采取阻止,所以:
<%= mail_to "example@email.com", subject: "Hi Please include your name", class: 'button-email' do
<span>Request more info about</span> <br> <span>holiday extensions here</span>
end %>
你不需要span标签,但是如果你想用颜色/ embolden来设置它们,你可以。
答案 1 :(得分:3)
在 Ruby on Rails 中你可以这样做:
<%= mail_to "example@email.com", "Request more info about <br />holiday extensions here".html_safe, Subject: "Hi Please include your name and email address", class: 'button-email' %>