相关疑难解决方法(0)

Bootstrap - 如何在小型设备上围绕图像进行文本环绕?

我刚刚开始使用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;
    }
}
Run Code Online (Sandbox Code Playgroud)

这是我的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>
Run Code Online (Sandbox Code Playgroud)

我希望图像在大屏幕上像那样悬挂.但是,在小型设备上,我想让文本环绕图像.我怎样才能做到这一点?

任何帮助,将不胜感激!

css image twitter-bootstrap

7
推荐指数
1
解决办法
6万
查看次数

标签 统计

css ×1

image ×1

twitter-bootstrap ×1