我正在尝试建立一个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>
你可以用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>
这是一个变通的解决方案,如果你没有找到任何其他的情况下,但它的工作,测试。