gpt4 book ai didi

css - Bulma(css 框架)添加 iframe 高度自动和嵌入的 YouTube 视频获得更少的高度

转载 作者:行者123 更新时间:2023-11-27 23:22:57 27 4
gpt4 key购买 nike

Bulma 添加了以下行:

img, embed, iframe, object, video {
height: auto;
max-width: 100%;
}

而且我不知道如何将嵌入的 YouTube 视频设置为预期高度,因为 height: auto它们的高度变小了,而且 height 没有属性我知道那会解决它。因为每种可能性的视频高度都会变低(相同大小)。所以我什至无法覆盖它。

embedded YouTube video with Bulma

谁能想出解决办法?

最佳答案

我有同样的问题,如果您可以编辑 iframe 样式,请使用样式高度替换高度
之前:

<iframe width="500" height="300"  src="//player.bilibili.com/player.html?aid=75317985" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>

之后

<iframe style="width:500px;height:300px;" src="//player.bilibili.com/player.html?aid=75317985" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>

之后,您的 iframe 将不会受到 Bulma.min.css 的影响。

关于css - Bulma(css 框架)添加 iframe 高度自动和嵌入的 YouTube 视频获得更少的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57918429/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com