【发布时间】:2014-01-07 16:48:03
【问题描述】:
我刚刚开始使用 Bootstrap。下面是我的页面截图。
我的 CSS 是
.snippet img{
width: 150px;
max-width: 100%;
height:auto;
}
@media(max-width: 767px) {
.snippet img{
width:100px;
float: right;
max-width: 100px;
height: auto;
margin-left: 10px;
margin-right: 10px;
}
}
这是我的 HTML:
<h2>About the venue</h2>
<div class="media-body snippet" >
<a class="pull-right" href="venue.php">
<img src="images/venue.jpg" alt="illustration"></a>
<p>this is the paragraph ... </p>
</div>
我希望图像像这样挂在大屏幕上。但是,在小型设备上,我想让文本环绕图像。我怎样才能做到这一点?
任何帮助将不胜感激!
【问题讨论】:
标签: css image twitter-bootstrap