嵌入 wmv 在 Chrome 中隐藏下拉/浮动对象

发布于 2024-09-29 05:54:37 字数 1172 浏览 1 评论 0原文

我尝试了在网络上找到的许多技巧,包括:

  • wmode 透明
  • z-index
  • WindowlessVideo

但它们似乎都不适用于 Chrome。在 IE 和 FF 上运行良好。

此版本的代码符合 XHTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>wmv embed test</title>
<style type="text/css">
#floatingbar { background: thistle; z-index: 9999; position: absolute; width: 500px; height: 60px; border: 1px solid blue; }
#floatingbar2 { background: white; z-index: 9999; position: absolute; width: 500px; height: 60px; border: 1px solid orange; top: 140px; }
</style>
</head>
<body>

<div id="floatingbar"></div>

<object type="application/x-mplayer2" style="width:260px; height:200px;" data="http://nov-exl.com/test/FactFinders.wmv">
<param name="movie" value="http://nov-exl.com/test/FactFinders.wmv" />
</object>

<div id="floatingbar2"></div>

</body>
</html>

I've tried many tricks found on the web including:

  • wmode transparent
  • z-index
  • WindowlessVideo

But none of them seem to work on Chrome. Works fine on IE and FF.

This version of code is XHTML compliant:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>wmv embed test</title>
<style type="text/css">
#floatingbar { background: thistle; z-index: 9999; position: absolute; width: 500px; height: 60px; border: 1px solid blue; }
#floatingbar2 { background: white; z-index: 9999; position: absolute; width: 500px; height: 60px; border: 1px solid orange; top: 140px; }
</style>
</head>
<body>

<div id="floatingbar"></div>

<object type="application/x-mplayer2" style="width:260px; height:200px;" data="http://nov-exl.com/test/FactFinders.wmv">
<param name="movie" value="http://nov-exl.com/test/FactFinders.wmv" />
</object>

<div id="floatingbar2"></div>

</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若水般的淡然安静女子 2024-10-06 05:54:37

如果您只想裁剪视频,可以将其放在 div 标签中,并将溢出设置为隐藏。像这样的事情:

<style> 
div#crop {position:absolute;height:100px;top:60px;overflow:hidden}
object, param {position:absolute;top:-60px}
</style>

<div id=crop><object><param /> </object></div>

如果您想要为您的视频提供更多自定义边框或其他内容,那么在 Chrome 中您可能会不走运。

If you just wanted to crop the video, you could put it in a div tag with overflow set to hidden. Something like this:

<style> 
div#crop {position:absolute;height:100px;top:60px;overflow:hidden}
object, param {position:absolute;top:-60px}
</style>

<div id=crop><object><param /> </object></div>

If you wanted a more custom border or something for your videos, you might be out of luck when it comes to Chrome.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文