【问题标题】:bold header text for rails and htmlrails 和 html 的粗体标题文本
【发布时间】:2015-09-20 21:01:43
【问题描述】:

我想让创建一个帐户按钮作为登录按钮加粗。 创建帐户按钮是这样制作的:

<%= f.submit "Create an account", class: "btn-submit" %>

使用额外的 CSS:

.btn-submit {
color: #FFFFFF;
font-size: 18px;
text-transform: uppercase;
text-decoration: none;
background: #c91717;
padding: 11px 20px;
border: 0;
margin-top: 6px;
}

并且登录按钮已经是粗体链接到喜欢:

<%= link_to("Register", {:controller => 'users', :action => 'new'}, :class => 'tosignup') %>

用于此的 CSS:

.tologin {

color: #FFFFFF;
font-size: 18px;
text-transform: uppercase;
text-decoration: none;
background: #c91717;
padding: 11px 20px;
border: 0;
margin-top: 6px;
margin-left: 905px;
}

我不知道如何使“创建和帐户”按钮像登录链接按钮一样加粗?你能帮我吗?谢谢

【问题讨论】:

  • 尝试使用浏览器中的检查元素工具找出添加它的类。它看起来不像它的 .tologin 类
  • 您可能应该用您的答案来回答您的问题,以便将来访问此问题的人可以轻松地看到解决方案。

标签: html css ruby-on-rails


【解决方案1】:

Element 工具帮助了我!我在一般的 html 和正文括号中删除了 font-weight: bold。现在登录链接就像创建一个不加粗的帐户。谢谢你

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多