在 Firefox 7 中,鼠标悬停事件会重新加载 Flash
我有以下结构:
<div class="feed-item" style="position:relative;" id="feed-611" onmouseover="showDelete()" onmouseout="hideDelete()">
<div class="feed-avatar">
AVATAR
</div>
<div class="feed-content">
CONTENTS
</div>
<div class="feed-attachment-video-holder" id="feed-attachment-video-holder611">
<object type="application/x-shockwave-flash" id="player611" data="http://www.youtube.com/e/bRU1XRuC6DI?enablejsapi=1&version=3&playerapiid=611" width="570" height="350"><param name="allowScriptAccess" value="always"></object>
</div>
它在 IE 和 Chrome 中工作正常,但在 Firefox 3,6 和 7 中,当鼠标进入 feed-item 时,youtube 播放器会重新加载,视频会再次开始。悬停效果的 css 是这样的:
-webkit-box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
-moz-box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
position:relative;
这是一个已知问题吗?您有任何想法如何解决这个问题吗?
I have the following structure:
<div class="feed-item" style="position:relative;" id="feed-611" onmouseover="showDelete()" onmouseout="hideDelete()">
<div class="feed-avatar">
AVATAR
</div>
<div class="feed-content">
CONTENTS
</div>
<div class="feed-attachment-video-holder" id="feed-attachment-video-holder611">
<object type="application/x-shockwave-flash" id="player611" data="http://www.youtube.com/e/bRU1XRuC6DI?enablejsapi=1&version=3&playerapiid=611" width="570" height="350"><param name="allowScriptAccess" value="always"></object>
</div>
It works fine in IE and Chrome but in Firefox 3,6 and 7 when The mouse enters the feed-item the youtube player reloads and the video starts again. The css for the hover effect is something like this:
-webkit-box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
-moz-box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
position:relative;
Is this a known problem and do you have any ideas how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Firefox 有各种导致 Flash 对象重新加载的错误。例如,如果您在 Flash 影片的容器上动态地更改显示、位置或溢出 css 属性的值,则 Flash 影片将重新加载(请参阅此错误)。 IFAIK,您无法自行解决此问题,请等待 Mozilla :(
回到您的代码,为什么当鼠标进入
feed- 时需要将视频容器位置更改为
? 删除relative
- itemposition:relative;
应该可以解决您的问题。Firefox has various bugs which cause Flash object reloads. For example, if you change the values of display, position, or overflow css properties dynamically on the container of a flash movie, the flash movie will reload (see this bug). IFAIK, you can't fix this problem by yourself, please wait for Mozilla :(
Back to your code, why you need to change video container position to
relative
when the mouse enter thefeed-item
? Removeposition:relative;
should solve your problem.有什么方法可以使用 :hover{} css 方法通过显示可见性来显示控件吗?
如果你想使用 jQuery,你可以使用:
这接近你想要的吗?
Is there any way you could use a :hover{} css meathod to show the control by making the visability to show?
If you want to use jQuery, you could use:
Is that close to what you want?