加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 如何在iFrame上显示Div或Panel

发布时间:2020-12-16 06:47:41 所属栏目:asp.Net 来源:网络整理
导读:如何在iframe上显示面板.我已经尝试过使用z-Index,但它无法正常工作,请查看示例图像.我没有尝试使用css我使用Z-Index,但它不起作用. 以下是我的代码…… table border="0" cellpadding="0" cellspacing="0" width="100%"tr align="left"td align="left"ifram
如何在iframe上显示面板.我已经尝试过使用z-Index,但它无法正常工作,请查看示例图像.我没有尝试使用css我使用Z-Index,但它不起作用.
以下是我的代码……

<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr align="left"><td align="left"><iframe width="70%" frameborder="0" height="770" id="myframe" runat="server" src="about:blank"></iframe></td></tr></table>
<div class="slide-out-div"><a class="handle" href="http://link-for-non-js-users">Content</a><h3 class="style1">Menu Items</h3><table border="0">
        <tr style=" float:left; height:39px"><td><ul><li><a href="">Special Instructions</a></li></ul></td></tr>
        <tr style=" float:left; height:39px"><td><ul><li><a href="">Processing Exception</a></li></ul></td></tr>
        <tr style=" float:left; height:39px"><td><ul><li><a href="">Account Coding</a></li></ul></td></tr>
        <tr style=" float:left; height:39px"><td><ul><li><a href="">View My Notes</a></li></ul></td></tr>
        <tr style=" float:left; height:39px"><td><ul><li><a href="">Approve/Disapprove</a></li></ul></td></tr>
        <tr style=" float:left; height:39px"><td><ul><li><a href="">Save & Close</a></li></ul></td></tr>
    </table>
</div>

解决方法

你应该看一下使用position:absolute CSS样式.

这是一个例子……

<div id="straddle">
    Here is the straddling div<br/>
    Here is the straddling div
</div>
<iframe id="myframe" src="about:blank"></iframe>

使用以下示例CSS …

#myframe {
    height:100px;
    width:200px;
    margin-left:100px;
}
#straddle {
    position:absolute;
    width:200px;
    border:1px solid red;
}

请参阅this jsfiddle live demo

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读