C# IE在Webform上加载PDF时隐藏菜单项
我有菜单项。当用户单击菜单项按钮(声明)时,会打开菜单项下方的PDF 问题是当我在Internet Explorer中加载相同的Web表单时,它会打开 PDF位于代码下方,但我的菜单项列表位于PDF后面C# IE在Webform上加载PDF时隐藏菜单项,c#,asp.net,web,iframe,internet-explorer-11,C#,Asp.net,Web,Iframe,Internet Explorer 11,我有菜单项。当用户单击菜单项按钮(声明)时,会打开菜单项下方的PDF 问题是当我在Internet Explorer中加载相同的Web表单时,它会打开 PDF位于代码下方,但我的菜单项列表位于PDF后面 string fileName = "IGI-Travel-Sure-Claim-Procedure.pdf"; this.myframe.Attributes["src"] = "../uploads/pdf/" + fileName; 以下是我关于如何在web表单上加载PDF的
string fileName = "IGI-Travel-Sure-Claim-Procedure.pdf";
this.myframe.Attributes["src"] = "../uploads/pdf/" + fileName;
以下是我关于如何在web表单上加载PDF的代码:
<iframe id="myframe" width="100%" height="600px" runat="server" frameborder="1" ></iframe>
上面的代码是当表单加载时,它会将PDF加载到web表单上
我的问题是,每当我在internet explorer中打开我的网站时,它都会将我的菜单项列表隐藏在iframe PDF查看器后面。同时,使用相同代码和iframe的相同网络表单在所有其他浏览器中都能正常工作,比如Chrome、FireFox、Opera和Edge,但在internetexplorer11中不行。
该应用程序是在框架2.0中开发的,请检查此图像
在寻找这个问题的答案后,我进行了深入的挖掘,但我知道如何找到答案。 希望那些有这个问题的人也能从我的答案中解决 在my
上应用简单CSS以显示PDF。
应用的简单CSS是
#Iframe-Master-CC-and-Rs {
max-width: 100%;
max-height: 100%;
overflow: hidden;
}
/* inner wrapper: make responsive */
.responsive-wrapper {
position: relative;
height: 0; /* gets height from padding-bottom */
/* put following styles (necessary for overflow and scrolling handling on mobile devices) inline in .responsive-wrapper around iframe because not stable in CSS:
-webkit-overflow-scrolling: touch; overflow: auto; */
}
.responsive-wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: none;
}
/* padding-bottom = h/w as % -- sets aspect ratio */
/* YouTube video aspect ratio */
.responsive-wrapper-wxh-572x612 {
padding-bottom: 107%;
}
这是代码
<div class="responsive-wrapper responsive-wrapper-wxh-572x612">
<iframe src="yourpdflink.pdf" style="width:100%; height:100%;" frameborder="0"></iframe></div>
现在在每个浏览器上都可以正常工作,如果还有问题,请发表评论进行讨论。我是新成员,因此无法根据StackOverflow的规则策略添加直接图像。这可能是CSS问题。检查此链接。希望它能帮助你。如果仍然需要任何其他帮助,请分享您的意见。感谢您的建议,但我已经完成了他们正在讨论的内容,并应用了提供的解决方案。但我的问题也一样