Bootstrap:如何在面板标题中居中图像?

 非机动车地了 发布于 2023-02-14 04:29

我有一类'面板标题中心',但面板中的图像不是居中的.我怎么能做到这一点?

<%= 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 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有