iframe内容显示为空白

时间:2019-05-06 22:34:40

标签: javascript jquery html iframe

我正在尝试在程序的iframe中显示一个带有引导轮播的网页,但该网页显示为空白。如果检查的话,所有元素都在那里,并且我可以单击应该在iframe中显示的页面上知道的按钮,但iframe仍为空白。如果我多次重新加载页面,有时它会正确显示。我正在iframe页面的顶部通过cdns加载boostrap,有趣的是,当我注释掉bootstrap.min.css链接时,轮播显然会中断,但是页面显示在iframe中。

这不是X帧问题,似乎也不是webkit issue

这是我的(.jade)页面的头,其中包含轮播(该页面应该在iframe中)。轮播本身是基本的bootstrap carousel

block meta_head
meta(name='robots', content='noindex')

//Latest compiled and minified CSS
link(rel='stylesheet', href='https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css')
//jQuery library
script(src='https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js')
//Latest compiled JavaScript
script(src='https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js')
link(rel='stylesheet', href='https://fonts.googleapis.com/icon?family=Material+Icons')
link(rel='stylesheet', href='https://code.getmdl.io/1.3.0/material.indigo-pink.min.css')

包含iframe的html:

<div id="my-element-container">
    <div id="my-element">
        <div id="iframe-container">
            <iframe id="my-iframe" src="https://www.mywebsite.com/myPageWithCarousel/" scrolling="no"></iframe>
        </div>
    </div>
</div>

任何帮助将不胜感激。

0 个答案:

没有答案
相关问题