我为我的图像提供了类"img-fluid",但它不适合屏幕



我给了我的图像类"img流体";在Bootstrap中,但它不适合我的网页,我该怎么办?

<img src="images406201.jpg" class="img-fluid" alt="...">
<div style="margin-top: 0px ;margin-left: 12px; width: 98.4%;" class="footer bg-dark text-light p-5">
<h3 style="text-align: center;">follow Us</h3>
<div class="d-flex justify-content-center flex-wrap">
<a href="#"><img style="width: 65px; margin: 2px;border-radius: 5px;" src="images/facebook-logo.png"
class="bg-light" alt="..."></a>
<a href="#"><img style="width: 65px; margin: 2px;border-radius: 5px;" src="imagestwitter-logo.png"
class="bg-light" alt="..."></a>
<a href="#"><img style="width: 65px; margin: 2px;border-radius: 5px;"
src="imagesinstagram-logo-png-transparent-0.png" class="bg-light" alt=""></a>
<a href="#"><img style="width: 65px; margin: 2px;border-radius: 5px;"
src="imagestelegram-logo-png-0.png" class="bg-light" alt=""></a>
</div>
<h4 style="text-align: center; margin-top: 15px;">Powered by Marvel Studious</h4>
</div>

当我给它样式=";宽度=100%";它可以工作,但问题是它不需要CSS。

我不确定这是否是问题所在,但img-fluid会将图像设置为给定位置的最大大小,例如,如果图像位于div内,则图像将是div的大小,而不是屏幕的大小,因此请确保图像不在限制其大小的内

将图像放在带有class"容器流体";。

<style>
.width-complete{
width:100%
}
</style>
<div class="container-fluid">
<img src="images406201.jpg" class="width-complete" alt="...">
</div> 

最新更新