作者:虎仔球妈_459 | 2023-09-02 13:58
我坚持看似与YouTube播放器的CSS/z索引冲突.在Windows XP下的Firefox 3中,请查看此页面:http://spokenword.org/program/21396单击"收集"按钮,并注意弹出的
显示
在 YouTube播放器
下方 .在其他浏览器上,
显示在顶部.它的z-index值为999999.我尝试将包含播放器的
元素的z-index设置为较低的值,但这不起作用.知道如何让弹出窗口出现在播放器上吗?1> CMS..: 尝试添加wmode
参数opaque
如下:
(请注意,它也包含在这两个 一个
标签和 一个wmode
在属性
标签.)
我喜欢这个网站. 2> ılǝ..: 虽然CMS的建议是有效的,但有一个重要的更新.如果你想使用'iframe'代替'embed',只需添加?wmode=transparent
到你的视频链接即可.我觉得这更简单干净.
更新 ,2014年2月
已经有一段时间了,这可能已经过时了.
有人报告说现在&wmode=transparent
有效.
这是最相关的答案,因为没有人再使用YouTube嵌入式代码.谢谢! 大!谢谢!的确,这是今天的相关答案:) 3> danfromisrae..: 我发现了一个纯JS功能,可以在所有浏览器中修复它!
你去的地方:
function fix_flash() {
// loop through every embed tag on the site
var embeds = document.getElementsByTagName('embed');
for (i = 0; i < embeds.length; i++) {
embed = embeds[i];
var new_embed;
// everything but Firefox & Konqueror
if (embed.outerHTML) {
var html = embed.outerHTML;
// replace an existing wmode parameter
if (html.match(/wmode\s*=\s*('|")[a-zA-Z]+('|")/i))
new_embed = html.replace(/wmode\s*=\s*('|")window('|")/i, "wmode='transparent'");
// add a new wmode parameter
else
new_embed = html.replace(//i))
new_object = html.replace(/ /i, " ");
// add a new wmode parameter
else
new_object = html.replace(/<\/object\>/i, " \n ");
// loop through each of the param tags
var children = object.childNodes;
for (j = 0; j < children.length; j++) {
try {
if (children[j] != null) {
var theName = children[j].getAttribute('name');
if (theName != null && theName.match(/flashvars/i)) {
new_object = new_object.replace(/
/i, "
");
}
}
}
catch (err) {
}
}
// replace the old embed object with the fixed versiony
object.insertAdjacentHTML('beforeBegin', new_object);
object.parentNode.removeChild(object);
}
}
}
现在你可以在用jQuery加载页面时运行:
$(document).ready(function () {
fix_flash();
});
推荐阅读
如何解决《如何从Racket中的html中提取元素?》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《Bootstrap模态使滚动条在关闭后消失》经验,为你挑选了2个好方法。 ...
[详细]
如何解决《具有通用引用的成员函数模板将不接受左值》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《如何在c中返回char(*)[6]?》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《邮件特色图像链接存储在WordPress数据库中的哪个位置?》经验,为你挑选了4个好方法。 ...
[详细]
如何解决《androidsqlite查询速度慢》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《BasicNetwork.performRequest:http://localhost/database/login.php的意外响应代码403》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《如何从录制的视频文件中提取音频》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《制作一个带有面积图的图表,其中正负y轴为直流或d3.js》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《Abs初学者Haskell模式匹配》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《使用Paperclip和AWSS3的自定义URL》经验,为你挑选了0个好方法。 ...
[详细]
如何解决《规范化HTTPURI》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《如何在nginx"if"语句中使用"或"运算符?》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《可能错误调用ArrayList索引?》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《什么是bash中的unix历史命令"!$"?》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《使用robomongo在json文档中搜索》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《条件检查由按位运算符替换》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《窃取ParallelComputingToolbox的工作》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《使用按钮启动此计时器》经验,为你挑选了1个好方法。 ...
[详细]
如何解决《如何使用asyncio添加连接超时?》经验,为你挑选了1个好方法。 ...
[详细]