简体   繁体   English

过渡到移动视图后如何在引导栏上将图像缩放为全宽

[英]How to make image scale to full width on bootstrap column after transition to mobile view

I'm struggling with making the image on the right stretch to full width in a moment when you'll make the screen size smaller so it transitions to mobile view. 当您要缩小屏幕尺寸以使其过渡到移动视图时,我正努力使图像在正确的方向上拉伸到全宽。 Is there any other class in bootstrap that would do similar work that "img-fluid" does but display image full width when it goes below the text in bootstrap grid system? 引导程序中是否还有其他类可以做与“ img-fluid”类似的工作,但是当图像低于引导程序网格系统中的文本时,会显示全角图像?

<div class="row">
<div class="col-md-6 d-flex">
<div class="align-self-center">
<p class="lead font-weight-bold">sometext</p>
</div>
</div>
<div class="col-sm-6">
  <img class="img-fluid" src="someimage.jpg">
</div>
</div>

Here is my fiddle: http://jsfiddle.net/x1hphsvb/2220/ To see what I mean simply lower the width of display window. 这是我的小提琴: http : //jsfiddle.net/x1hphsvb/2220/要了解我的意思,只需减小显示窗口的宽度。 Image goes below the text and fills only half of the div when I want it to fill it fully and behave as it does right now before the transition. 图像位于文本下方,并且仅填充div的一半时(我希望它完全填充并且在过渡之前就表现出来)。

Both the columns should have the same breakpoint (ie; md / sm ) so that they become full-width at the same time... 两列都应具有相同的断点(即md / sm ),以便它们同时变为全角...

   <div class="row">
     <div class="col-md-6 d-flex">
      <div class="align-self-center">
       <p class="lead font-weight-bold">sometext</p>
      </div>
     </div>
     <div class="col-md-6">
      <img class="img-fluid" src="someimage.jpg">
     </div>
   </div>

http://jsfiddle.net/dwnu5zjq/ http://jsfiddle.net/dwnu5zjq/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用引导程序 3 使我的图像全宽 - How to make my image full width with bootstrap 3 如何缩放Bootstrap 4表单以适合移动视图中的宽度? - How do I scale a Bootstrap 4 form to fit the width in mobile view? 如何使按钮在移动视图中扩展到全宽而不使用引导程序结束 pc? - how to make buttons extend to full width in mobile view while not end pc using bootstrap? 如何使用 HTML CSS 和 Bootstrap 4 使行和列容器垂直堆叠并缩放以用于移动视图 - How to make row and column containers stack vertically and scale for mobile view with HTML CSS and Bootstrap 4 使用Bootstrap在列上的图像全宽 - image full width on column with Bootstrap 如何使全角图像响应? (无比例/拉伸) - How to make full width image responsive? (no scale / stretch) 如何使卡片全宽并且即使在移动视图中也显示图像(usig tailwindcss) - How do I make a card full width and the image displayed besid even at mobile view (usig tailwindcss) Bootstrap使全宽全高列 - Bootstrap make full width full height column 如何在不更改CSS中比率的情况下将图像缩放到列宽(引导4)? - How to scale image to column width without changing ratio in CSS (Bootstrap 4)? 如何在移动视图中使 Bulma box 元素中的元素全宽 - How to make elements in Bulma box element full width in mobile view
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM