试图在反应中嵌入另一个内网网站

问题描述 投票:0回答:1

我正在尝试建立一个react应用程序,其中我已经创建了一个 "帮助 "菜单。在 "帮助 "中,我放了iFrame代码来显示内部网站、confluence页面、显示文档和视频。问题是,confluence页面也有页眉,而我的应用程序也有自己的页眉。有没有办法在我的react应用程序中选择另一个web应用程序的选定区域。

<div>
           <Iframe url="https://community.intranet.com/community/pages/home"
            width="100%"
            height="450px"
            id="myId"
            className="myClassname"
            display="initial"
            position="relative"/>

          </div>
reactjs react-router react-dom
1个回答
1
投票

你可以用css来做。

        <div style={{ marginTop: -50 }}> //whatever is the height of the confluence page header
          <Iframe
            url="https://community.intranet.com/community/pages/home"
            width="100%"
            height="450px"
            id="myId"
            className="myClassname"
            display="initial"
            position="relative"
          />
        </div>

这是一个变通的解决方案,如果你没有找到任何其他的情况下,但它的工作,测试。

© www.soinside.com 2019 - 2024. All rights reserved.