0
说我有类似如下:锚链接到一节中的iframe内容
<!-- index.html -->
<a href="#heading32">Link to Section</a>
<section id="heading1">Section Name</section>
<div>Content</div>
<section id="heading2">Section Name</section>
<div>Content</div>
<section id="heading3">Section Name</section>
<div>Content</div>
<!-- More sections -->
<section id="heading32">Section Name</section>
<div>Content</div>
<!-- More sections -->
基本上,我想要实现类似于您在像维基百科,在那里你点击一个链接的网站找到什么功能在内容列表中,它会将您的页面向下滚动到链接的部分。
现在,我需要改变代码如下:
<!-- index.html -->
<a href="#heading32">Link to Section in iFrame</a>
<iframe src="content.html">
<!-- content.html -->
<section id="heading1">Section Name</section>
<div>Content</div>
<section id="heading2">Section Name</section>
<div>Content</div>
<section id="heading3">Section Name</section>
<div>Content</div>
<!-- More sections -->
<section id="heading32">Section Name</section>
<div>Content</div>
<!-- More sections -->
基本上,表的内容现在是在父容器,并点击一个应有的iframe中的内容去链接的部分 - 与以前相同的功能,只是内容现在被重新定位。
我应该如何进一步修改我的实现来实现它?内容是从Microsoft Word文档导出的,因此内容HTML文档本身无法修改。然而,我的系统的框架确实允许我添加脚本和样式表,但仅此而已。