我有一类'面板标题中心',但面板中的图像不是居中的.我怎么能做到这一点?
<%= link_to 'Back', things_path %><%= image_tag @thing.image.url(:medium) %><%= @thing.title %>
<%= @thing.description %>
<%= @thing.user.email %>
<% if @thing.user == current_user %> <%= link_to 'Edit', edit_thing_path(@thing) %> <% end %>
Zim.. 17
您可以使用Bootstrap
text-center
类.....演示:http://bootply.com/97325
1 个回答
您可以使用Bootstrap
text-center
类.<div class="row"> <div class="col-md-offset-2 col-md-8"> <div class="panel panel-default"> <div class="panel-heading text-center"> .. </div> <div class="panel-body"> .. </div> </div> </div> </div>演示:http://bootply.com/97325
2023-02-14 05:20 回答雷神鑫源义_341撰写答案