javascript - Bootstrap 3.0 行和图像/div 并排

标签 javascript html css twitter-bootstrap

我无法找到使用 Bootstrap 的网格系统实现此目的的正确方法(我可能误用了它)。

我想要的是一个 div,其中最左边是一个图像,其余内容是一个全尺寸的 .row 来容纳表单字段。我想我遗漏了一些关于 bootstrap 如何使用它的各种类的基本知识。

<div class="card">
  <span class="f-icon glyphicon glyphicon-file pull-left"></span>
  <div class="col-xs-6 col-sm-6 col-md-6">
    I want this to be the first half of the remaining content
  </div>
  <div class="col-xs-6 col-sm-6 col-md-6">
    I want this to be the second half of the remaining content
  </div>
</div>

fiddle :https://jsfiddle.net/p37bc1n0/

最佳答案

检查下面的 jsfiddle。您需要 3 列布局:一个保留 img,第二个保留前半部分内容,第三个保留后半部分内容。

https://jsfiddle.net/Smita31Jain/ctm7juLj/

 <div class="card">
   <div class="col-xs-2 col-sm-2 col-md-2">
     <span class="f-icon glyphicon glyphicon-file pull-left"></span>
   </div>
   <div class="col-xs-5 col-sm-5 col-md-5">
     I want this to be the first half of the remaining content
   </div>
   <div class="col-xs-5 col-sm-5 col-md-5">
     I want this to be the second half of the remaining content
   </div>
  </div>

关于javascript - Bootstrap 3.0 行和图像/div 并排,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43621086/

相关文章:

javascript - 在 Javascript 中从 base64 数据保存二进制文件

javascript - 具有负数和非整数幂的 Math.pow

html - 任何人都可以帮助新手编写自定义 css 代码吗? (小部件上的样式继承边框)

javascript - 如何在加载JavaScript之前格式化网页

jquery - 响应式导航 'max-height' 问题(CSS3 转换)

javascript - Angular 2 自己的类装饰器来访问依赖注入(inject)服务

javascript - 使用 AJAX 的数据表,求和并添加总页脚

html - 混合混合模式按钮悬停事件问题

css - CSS仅会使div元素中的背景图片模糊

css - Sass for 循环通过 td 使用::before 选择器