【发布时间】:2015-12-04 05:56:42
【问题描述】:
我想要的是底部的按钮,但我拥有的是顶部的按钮。
问题在于 HTML 中的顶部按钮:
<form class="button_to" method="get" action="/"><input type="submit" value="Ok" /></form>
和 HTML 中的底部按钮:
<button type="button">Ok</button>
顶部按钮的 CSS 是:
.signup-success input[type="submit"],
.signup-success input[type="submit"]:active,
.signup-success input[type="submit"]:focus {
width: 80%;
background: transparent;
color: #00AA66;
border-color: #00AA66;
}
底部按钮的 CSS 是:
.signup-success button,
.signup-success button:active,
.signup-success button:focus {
margin-top: 15px;
width: 80%;
background: transparent;
color: #00AA66;
border-color: #00AA66;
}
如果它有助于从 rails .erb 扩展生成顶部按钮
<%= button_to "Ok", root_path, :method => :get %>
帮助我让顶部按钮看起来像底部按钮。我尝试在 CSS 中添加禁用阴影的代码,但没有成功:(
【问题讨论】:
-
尝试设置边框:无;首先,然后在它之后设置边框。边框:无;边框:2px 实心#00aa66;
-
尝试设置border-width属性....玩不同的值。
标签: html css ruby-on-rails shadow