【问题标题】:making nested content take up full width使嵌套内容占据整个宽度
【发布时间】:2020-11-05 06:10:07
【问题描述】:
.video-responsive {
width: 100%,
height: auto
}

我有一张只有标题和嵌入其中的 youtube iframe 视频的反应卡。我希望视频采用全宽和全高,而不受卡的限制。

【问题讨论】:

    标签: html css reactjs video iframe


    【解决方案1】:

    您可以使用vhvw 单位,它们指的是当前屏幕的宽度和高度,所以:

    .video-responsive {
        width: 100vw
    }
    

    您可能还需要更改包含元素的 overflow-y 设置。

    【讨论】:

      猜你喜欢
      • 2015-02-12
      • 2021-01-30
      • 1970-01-01
      • 2018-08-17
      • 2013-08-28
      • 1970-01-01
      • 1970-01-01
      • 2019-12-27
      • 2021-09-26
      相关资源
      最近更新 更多