CSS 使用 bootstrap3 右对齐图像
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34770379/
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-08-30 11:40:46 来源:igfitidea点击:
Right-align Image using bootstrap3
提问by Krishna Rana
<div class="row">
<div class="col-xs-3">
<img src="image/t.png " class="img-responsive">
</div>
<div class="col-xs-9 ">
<img src="image/b.png " class="img-responsive">
</div>
</div>
I want b.png
image to be right-align.
我希望b.png
图像右对齐。
回答by Alexandru R
You just need to add .pull-right
class.
So it will be like this example :
你只需要添加.pull-right
类。所以它会像这个例子:
<div class="row">
<div class="col-xs-3">
<img src="image/t.png " class="img-responsive">
</div>
<div class="col-xs-9 ">
<img src="image/b.png " class="pull-right img-responsive">
</div>
</div>
回答by Norvert John Abella
Just add the pull-right
bootstrap class
只需添加pull-right
引导程序类
<div class="col-xs-9 ">
<img src="image/b.png " class="img-responsive pull-right">
</div>