【问题标题】:z-index style being ignored on embedded video [closed]z-index 样式在嵌入式视频中被忽略 [关闭]
【发布时间】:2013-04-30 06:52:10
【问题描述】:

由于某种原因,我无法修改嵌入视频的 z-index 以使其显示在图像前面。我知道初学者不对所述视频应用定位的错误,并且我尝试应用绝对和相对定位无济于事。 我查看了下面的问题,我知道可以使用内联样式修改 z-index。有人可以解释为什么我的 z-index 样式被忽略了吗?

Z-Index without style sheet

<!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>
<link rel="stylesheet" type="text/css" href="SDL.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Home</title>
</head>

<body>

<img src="img/SDL 4 Final Recompress.jpg"/>
<embed
src="http://blip.tv/play/AwGUv2w"
type="application/x-shockwave-flash" width="669"
height="500" allowscriptaccess="always"
allowfullscreen="true" style="postion:absolute;z-index:2;">
</embed>
<img src="img/Stage-Background.png" style="postion:absolute;z-index:1;"/>

</center> 


</body>
</html>

【问题讨论】:

  • wmode="opaque" 添加到嵌入元素。

标签: css position embed z-index styling


【解决方案1】:

尝试将您的风格从position:absolute; 变为position:relative;。我不认为它对你有用,但对我有用。

更新 顺便说一句,您输入了postion 而不是position。或者如果你有和现有的其他css样式,你可以把position:relative !important;

【讨论】:

  • 我无法相信这个错误是多么愚蠢。我拼错了位置。很抱歉浪费了您的时间。
  • 我已将此帖子标记为删除
猜你喜欢
  • 1970-01-01
  • 2012-02-22
  • 2012-05-08
  • 2013-11-15
  • 2012-01-19
  • 2012-03-25
  • 2014-01-01
  • 2012-06-19
  • 1970-01-01
相关资源
最近更新 更多