当我关闭模态(在模态外单击)时,网页仍然是黑暗的,我必须再次单击页面上的某个位置才能再次正常。任何人都知道问题可能是什么?
_post_modal.html.erb
<div id="<%= p.id %>" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<p><h3 id="myModalLabel"><%= p.title %></h3></p>
</div>
<div class="modal-body">
<%= raw(p.link) %>
</div>
</div>
_single_post.html.erb
<% @posts.each do |p| %>
<%= render "post_modal" %>
<% end %>
list.html.erb
<div class="container">
<%= render 'single_post' %>
</div>
应用程序.html.erb
<body>
<%= link_to('Logout user', destroy_user_session_path, :method => :delete) %>
<%= link_to('Logout admin', destroy_admin_session_path, :method => :delete) %>
<%= yield %>
</body>
自定义.css.scss
body{
background-image:url('dark_leather.png');
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
line-height: 18px;
}
.container{
vertical-align: center;
}
.modal{
h3{
font-family: 'Josefin Slab', serif;
font-size: 18pt;
font-weight: 400;
color: #34DDDD;
}
}