gpt4 book ai didi

macos - 嵌入式YouTube iframe在Safari(MacOS)中无法正常工作

转载 作者:行者123 更新时间:2023-12-03 06:13:27 25 4
gpt4 key购买 nike

我在(bootstrap)网站上有一个自适应的嵌入式YouTube视频。
当我选择YouTube全屏选项时,它可以在Firefox和Chrome上运行,但是在Safari上它会短暂闪烁,然后仅以全屏显示整个网页的顶部,就像Safari本身处于全屏模式一样。

CSS:

.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

HTML:
<div class='embed-container'><iframe src='https://www.youtube.com/embed/myyoutubecode?rel=0' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>

有人知道在Safari中实现此功能的方法吗?

最佳答案

我找到了答案..以防其他任何人遇到这种情况:
wow.js动画似乎通过引起此问题而破坏了全屏功能。禁用div的动画可解决此问题。

关于macos - 嵌入式YouTube iframe在Safari(MacOS)中无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47819850/

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