【问题标题】:Bootstrap image height not responsive for mobile引导图像高度对移动设备没有响应
【发布时间】:2018-11-06 22:34:09
【问题描述】:

制作一个从导航栏下方顶部开始的图像的网站,我使用的是 Bootstrap 4 和 css。对于大屏幕,我使用背景图像来确保图像拉伸整个屏幕宽度。对于我使用的移动版本

<div class="container-fluid">
<div class="row leftmargin-row"
    <img src="images/1920 x 580 2.jpg" alt="child-pic" 
            class="img-responsive img-fluid">
</div>

【问题讨论】:

  • 请在您的问题中准确解释您在移动设备上所做看到的内容。 (截图/图表也总是很有帮助)
  • 在移动设备中,图像宽度固定在屏幕内,但高度拉伸太长。我使用了高度:100%,但没有用,对于上面遗漏的问题,我很抱歉,第一次使用堆栈溢出不确定我剩下的问题发生了什么。

标签: css image mobile bootstrap-4 height


【解决方案1】:
<div class="container-fluid">
   <div class="row leftmargin-row">
      <img src="images/1920 x 580 2.jpg" alt="child-pic" 
        class="img-responsive img-fluid">
   </div>
</div>

我想你忘了在 div 之后关闭尖括号...

【讨论】:

  • 我想你忘了关闭 img 标签
猜你喜欢
  • 2020-06-25
  • 1970-01-01
  • 2019-03-17
  • 2023-03-29
  • 2013-12-31
  • 1970-01-01
  • 1970-01-01
  • 2017-08-26
  • 2020-09-06
相关资源
最近更新 更多