【发布时间】:2015-10-26 23:42:31
【问题描述】:
每次我将鼠标悬停在它上面时,我都会尝试让 glyphicon 图标出现。我正在使用<span> 标签。但这拒绝工作。我做错了什么?
application.scss
/*
*= require bootstrap3-editable/bootstrap-editable
*= require bootstrap-datepicker3
*= require_tree .
*/
@import "bootstrap-sprockets";
@import "bootstrap";
.hovering:before {
display: none;
}
.hovering:hover:before {
display: block;
}
在我的 view 文件中,它看起来像这样:
<span class='hovering'>
<%= link_to user_task_path(current_user, task.id), method: :delete,
data: { confirm: 'Are you sure?' }, remote: true do %>
<i class="glyphicon glyphicon-trash"></i>
<% end %>
</span>
【问题讨论】:
标签: javascript jquery html css css-content