当我单击 Intranet 中的链接时,如何将我公司的实时公共(public)网页嵌入到我现在正在重新设计的公司 Intranet 站点中?我正在使用 iframe。公司公共(public)域在 WordPress 中。 我遇到了这些链接,但没有一个可以帮助我: - How do you put only a certain section of a website into an iframe? - Loading wordpress page content in colorbox Iframe
我的 HTML
<div class="menuItem">
<a href="http://mvrcancerhospital.com/camps/" target="displayBox"> <b>Events</b></a>
</div><br><br>
<div class="menuItem">
<a href="http://mvrcancerhospital.com/news/" target="displayBox"> <b>News</b></a>
</div><br><br>
<iframe src="" frameborder="0" name="displayBox" width="100%" height="400px"> </iframe>
我的 CSS
.menuItem
{
float: left;
margin-top: 5%;
width: 120px;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:15px;
font-weight:bolder;
transition-property: width;
}
.menuItem:hover
{
color: #CB4154;
transform: scale(1.2);
}
.leftSec .menuItem
{
font-size:18px;
}
最佳答案
在 WP Security -> Miscellaneous -> Frames Tab 下,Wordpress 中有一个选项可以禁用框架或 iframe 显示您的网站内容。 在其中您可以选择启用 iFrame 保护。 如果单击该复选框,您将无法将内容直接显示到您的 iFrame。如果未选中,其他站点的 iFrame 将能够显示您的网页。 :)
关于html - 如何在没有 JS 或 Ajax 或 JSQ 的静态 html <iframe> 中嵌入 WP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48786706/