Css 图像不';当网格最小化时,不适合网格
当我看到分辨率为Css 图像不';当网格最小化时,不适合网格,css,twitter-bootstrap,Css,Twitter Bootstrap,当我看到分辨率为sm和xs的设备时,我的图像有空间,如何使其与网格相匹配 这是我的密码 <div class="container"> <div class="row"> <div class="col-md-7"> <img src="http://placehold.it/550x350" class="img-responsive"> </div> <div class="col-md-5">
sm
和xs
的设备时,我的图像有空间,如何使其与网格相匹配
这是我的密码
<div class="container">
<div class="row">
<div class="col-md-7">
<img src="http://placehold.it/550x350" class="img-responsive">
</div>
<div class="col-md-5">
<h2>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</h2>
<p>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</p>
</div>
</div>
</div>
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比?
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比
从分辨率991px到581px
我从图像中获得了空白(好像它不适合网格)
如何修复它?我只需添加
宽度:100%代码>到您的图像中我只需添加宽度:100%代码>到您的图像可能是您的解决方案代码:
<div class="container-fluid">
<div class="row">
<div class="col-md-7">
<img src="http://placehold.it/550x350" class="img-responsive" style="width:100%" alt="Image">
</div>
<div class="col-md-5">
<h2>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</h2>
<p>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</p>
</div>
</div>
</div>
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比?
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比
可能是您的解决方案代码:
<div class="container-fluid">
<div class="row">
<div class="col-md-7">
<img src="http://placehold.it/550x350" class="img-responsive" style="width:100%" alt="Image">
</div>
<div class="col-md-5">
<h2>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</h2>
<p>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</p>
</div>
</div>
</div>
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比?
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比
对于sm
和xs
屏幕,您没有使用引导类
,请使用它,并将img
从max width
更改为width
img{
width :100%;
}
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-7">
<img src="http://placehold.it/550x350" class="img-responsive">
</div>
<div class="col-xs-12 col-sm-12 col-md-5">
<h2>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</h2>
<p>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</p>
</div>
img{
宽度:100%;
}
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比?
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比
您没有为sm
和xs
屏幕使用引导类
,请使用该选项,并将img
从max width
更改为width
img{
width :100%;
}
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-7">
<img src="http://placehold.it/550x350" class="img-responsive">
</div>
<div class="col-xs-12 col-sm-12 col-md-5">
<h2>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</h2>
<p>How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?</p>
</div>
img{
宽度:100%;
}
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比?
如何自动调整大图像的大小,使其适合较小的宽度div容器,同时保持其宽高比
尝试添加自定义样式
尝试像这样添加自定义样式?这样地?