【发布时间】:2016-12-30 01:00:10
【问题描述】:
我正在网站上嵌入来自 Google 驱动器的视频,并且视频在 Chrome 和 Firefox 中显示正常。在 IE 11 和 Edge 中,这是不行的。我假设这是浏览器中的隐私设置,尽管我不确定是哪个。此外,如果它是隐私设置,这显然不起作用,因为我无法为他们进入每个用户的设置!解决方案或变通方法?
这是我正在使用的 iframe 代码...
<style>
.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%;
border:none;
}
</style>
<div class="embed-container">
<iframe src="https://drive.google.com/file/d/0B8az0_GAjTu8WWZ4Q2RxX1RoZWc/preview"></iframe>
</div>
【问题讨论】:
-
这对我来说在 IE9 jsfiddle.net/8Ltwket0
-
它抛出“请求的资源上不存在访问控制允许源头”错误。请参阅以下问题以获取更多信息。 stackoverflow.com/questions/20035101/… 请同时检查您的浏览器设置。
标签: html internet-explorer iframe microsoft-edge