如何把一个iframe绝对在顶部没有隐藏的身体 [英] how to put an iframe absolutely on top without concealing the body

查看:315
本文介绍了如何把一个iframe绝对在顶部没有隐藏的身体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个iframe:

so I have an iframe:

<iframe style="width:100%;height:45px;position:fixed;top:0px;left:0px;z-index:2147483649" src="etc" scrolling="no" frameborder="0px"></iframe>

,但是这个iframe会隐藏正文内容的顶部,因为这个iframe会覆盖内容....有一种方法来配置这个iframe与HTML,javascript等,这样它就不会隐藏的身体了(没有坏笑话plz)

but then this iframe would conceal the top portion of the body contents since this iframe will be over the body contents....is there a way to configure this iframe with html, javascript, etc so that it wouldn't conceal the body anymore (no dirty jokes plz)

我也想让它不向下滚动,并且永远会绝对在页面的顶部,即使当用户向下滚动页面下来...但这样做而不覆盖正文内容...想到一个工具栏

also I'm trying to get it to not scroll down and will always be absolutely on the top of the page even when the user scrolls the page down...but doing so without covering the body contents...think of a toolbar

推荐答案

<iframe style="height:45px;position:absolute;top:0px;left:0px;" src="etc" scrolling="no" frameborder="0px"></iframe>

<div style='position:absolute;left:0;right:0;top:45px;bottom:0;overflow:auto;'>Your body content</div>

这篇关于如何把一个iframe绝对在顶部没有隐藏的身体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆