Bootstrap 3 偏移在右侧而不是左侧 [英] Bootstrap 3 offset on right not left

查看:20
本文介绍了Bootstrap 3 偏移在右侧而不是左侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于 BS 3,如果我只想要右边的一小列内容,我可能会使用偏移类 9 和列 3.

但是,如果我想要反向和左侧怎么办?在 BS 中是否有正确的方法可以做到这一点,还是应该使用我自己的 CSS 方法?我想用我的内容创建一个 3 列和一个 9 空列.

解决方案

引导行总是包含它们的浮点数并创建新行.您无需担心填充空白列,只需确保它们加起来不超过 12.

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.最小.css"><div class="容器"><div class="row"><div class="col-xs-3 col-xs-offset-9">我是右列 3

<div class="row"><div class="col-xs-3">我是左列 3

<div class="panel panel-default"><div class="panel-body">我在两列下面都有一些内容

In regards to BS 3 if I wanted just a narrow column of content on the right I might use an offset class of 9 and a column of 3.

However, what if I wanted the reverse and on the left side? Is there a proper way to do this in BS or should I just use my own CSS methods? I was thinking of creating a column of 3 with my content and just an empty column of 9.

解决方案

Bootstrap rows always contain their floats and create new lines. You don't need to worry about filling blank columns, just make sure they don't add up to more than 12.

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<div class="container">
  <div class="row">
    <div class="col-xs-3 col-xs-offset-9">
      I'm a right column of 3
    </div>
  </div>
  <div class="row">
    <div class="col-xs-3">
      I'm a left column of 3
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-body">
      And I'm some content below both columns
    </div>
  </div>
</div>

这篇关于Bootstrap 3 偏移在右侧而不是左侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
其他开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆