简体   繁体   English

外部javascript文件无法在所有内容之上添加div

[英]External javascript file can't add div on top of everything

I'm making javascript program which adds div to some pages (as external script). 我正在制作将div添加到某些页面的javascript程序(作为外部脚本)。 The problem is I don't have access to html code of this pages - my client just puts /script src=""/ on it and I'm stuck: 问题是我无权访问此页面的html代码-我的客户端仅将/script src=""/放到它上面,所以我被卡住了:
My div have to slide from bottom of a page, so I'm using fixed position and here it is - my div is hiding below flash elements of pages. 我的div必须从页面底部滑动,所以我使用的是固定位置,这就是-我的div隐藏在页面的flash元素下方。

So what I need: 所以我需要:
No matter how page looks like, what have in layout - I have to make my new sliding div showing over everything without making any changes to html code of page itself. 无论页面看起来如何,布局如何-我都必须使新的滑动div显示所有内容,而无需对页面本身的html代码进行任何更改。

No idea. 不知道。 Don't know how page looks like - can't use position:relative i guess. 我不知道页面的外观-不能使用position:relative Just flash is over my div. 我的股利刚刚闪过。

//Only in Chrome my div is over flash //只有在Chrome中,我的div才结束

This is caused by the way IE renders some elements and plugins. 这是由IE渲染某些元素和插件的方式引起的。 See Insert div over flash in IE for more information. 有关更多信息,请参见在IE中通过Flash插入div

The challenge in your case is that you are not able to edit the source of the page. 您面临的挑战是您无法编辑页面源。 I have been involved in similar cases before and the only solution we found at the time was to replace the div with and iframe and then place the content of the div there. 之前,我曾参与过类似的案例,当时我们发现的唯一解决方案是将div替换为and iframe ,然后将div的内容放在那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM