Vah*_*iri 44 image twitter-bootstrap
我刚下载了Bootstrap 4 alpha 2的源代码,但无法img-responsive在其中找到该类.它存在于Bootstrap 3源代码中,我可以使用Notepad ++找到它,但bootstrap.css在dist文件夹中的Bootstrap 4s 中它不存在.
它发生了什么?
Box*_*iom 68
Bootstrap中的图像通过.img-fluid进行响应.最大宽度:100%; 和身高:汽车; 应用于图像,以便它与父元素一起缩放.
Tah*_*667 14
引导程序3: .img-responsive
引导程序4: .img-fluid
Bootstrap 4中的图像使用.img-fluid进行响应。最大宽度:100%;和高度:自动;应用于图像,以便与父元素缩放。
<img class="img-fluid" src="" alt=""> //This will make your image responsive
Run Code Online (Sandbox Code Playgroud)
小智 5
如果您使用的是 Bootstrap 4 alpha 2,您似乎需要使用一个新类 img-fluid 而不是 img-responsive。看看:http : //v4-alpha.getbootstrap.com/content/images/