嵌入视频上忽略z-index样式

时间:2013-04-30 06:52:10

标签: css position embed z-index styling

出于某种原因,我无法修改嵌入视频的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>

1 个答案:

答案 0 :(得分:0)

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

<强>更新 顺便说一句,你放postion而不是position。或者如果你有内置的其他css样式,你可以放position:relative !important;

相关问题