twitter-bootstrap 使用 Twitter Bootstrap 将右侧内容向左移动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13013789/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 15:34:36  来源:igfitidea点击:

Moving Right-Side Content to Left using Twitter Bootstrap

csstwitter-bootstrap

提问by Brian Mains

I am using Twitter Bootstrap framework to layout my page. I have this content:

我正在使用 Twitter Bootstrap 框架来布局我的页面。我有这个内容:

<div class="clearfix row">
   <div class="span4">..</div>
   <div class="span4">..</div>
   <div class="span4">Right Content</div>
</div>

What I'm trying to do is move the content labelled "Right Content" above the other content when in phone view. I know the complexities of this without using JavaScript, but is there a way to do that in Twitter Bootstrap, either through CSS or JS?

我想要做的是在手机视图中将标有“正确内容”的内容移动到其他内容上方。我知道不使用 JavaScript 的复杂性,但是有没有办法在 Twitter Bootstrap 中通过 CSS 或 JS 做到这一点?

Thanks.

谢谢。

回答by wavetree

This is what you want to do, presuming you only have the three columns in the one row div.

这就是您想要做的,假设您在一行 div 中只有三列。

<div class="container">
    <div class="row">
        <div class="span4 pull-right">Right Content</div>
        <div class="span4">..</div>
        <div class="span4">..</div>
    </div>
</div>

See my sample here.

在此处查看我的示例。