HTML div 显示在 Flash 对象之上
我有一个 Flash 幻灯片,上面有 2 个 div,一个在顶部,一个在底部。
<header>
<div id="top-menu">
<ul>
<li>Main Menu Link</li>
<li>Main Menu Link</li>
<li>Main Menu Link</li>
</ul>
</div>
<header>
<div id="content">
<div id="slideshow_wrapper">
<section id="intro">
<p>Introduction Text</p>
</section>
<section id="slideshow">
<!--dynamically inserted flash object-->
</section>
</div>
</div>
两者在 Firefox/Safari/Chrome 中都能正确叠加,但我尝试的任何方法似乎都无法使其在 IE 中工作。我正在使用 Remy Sharp 的 HTML 5 启用脚本 来制作 HTML5标记在较低版本的 IE 中工作。 有趣的是,第二个 div #intro
正确叠加,但 #top-menu
始终出现在幻灯片后面。
所有 3 个元素均通过显式设置的 z 索引进行绝对定位。无论我将它们设置多高或多低,flash 对象始终位于 #top-menu
元素前面。
我检查了渲染的 标签,其中一个将
wmode
列为 transparent
。
Flash 对象是通过 CMS 用 php 动态插入的,因此我无法访问许多人建议添加 transparent
属性的 标记。
I have a flash slideshow with 2 divs overlaying it, one at the top and one at the bottom.
<header>
<div id="top-menu">
<ul>
<li>Main Menu Link</li>
<li>Main Menu Link</li>
<li>Main Menu Link</li>
</ul>
</div>
<header>
<div id="content">
<div id="slideshow_wrapper">
<section id="intro">
<p>Introduction Text</p>
</section>
<section id="slideshow">
<!--dynamically inserted flash object-->
</section>
</div>
</div>
Both overlay properly in Firefox/Safari/Chrome, but nothing I try seems to make it work in IE. I'm using Remy Sharp's HTML 5 enabling script to make the HTML5 mark-up work in lower versions of IE.
What's funny is that the second div, #intro
overlays correctly, but #top-menu
always appears behind the` slideshow.
All 3 elements are absolutely positioned with z-indexes explicitly set. No matter how high or low I set them the flash object is always in front of the #top-menu
element.
I have checked the rendered <param>
tags and one of them lists wmode
as transparent
.
The flash object is dynamically inserted with php through a CMS, so I have no access to the <embed>
tag that many have suggested adding the transparent
attribute to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需尝试底部:15px 和顶部:15px - 然后删除边框并根据需要设置盒子的样式。不推荐上面的目标代码,因为我只是为您输入一个快速解决方案。
只需尝试底部:15px 和顶部:15px - 然后删除边框并根据需要设置盒子的样式。不推荐上面的目标代码,因为我只是为您输入一个快速解决方案。
为您提供一个实例,请注意视频上方的顶部框: http://www.xxxxxxxxxxxxxxx.com/x .php
Simply experiment with the bottom:15px and the top:15px - and then remove the border and style the box as you wish. the object code above is not recommend as I am just typing a quick solution for you.
Simply experiment with the bottom:15px and the top:15px - and then remove the border and style the box as you wish. the object code above is not recommend as I am just typing a quick solution for you.
A live example for you, notice the top box over the video: http://www.xxxxxxxxxxxxxx.com/x.php