您好我正在使用以下代码:
<div id="wrapper">
<div id="header">HEADER</div>
<div id="content-main">
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
id="selfieland"
width="100%" height="100%">
<param name="movie" value="selfieland.swf">
<param name="bgcolor" value="#D6D6D6">
<param name="quality" value="high">
<param name="seamlesstabbing" value="false">
<param name="allowscriptaccess" value="samedomain">
<PARAM NAME="SCALE" VALUE="default">
<embed
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
name="selfieland"
width="100%" height="100%"
src="Images/selfieland.swf"
bgcolor="#D6D6D6"
quality="high"
seamlesstabbing="false"
allowscriptaccess="samedomain"
SCALE="default"
>
</embed>
</object>
TEST
</div>
<div id="footer">© net - Copyright 2014 - Terms and Conditions</div>
</div>
我可以看到标题,但是标题和主要内容部分存在巨大差距, 而我最大的问题是,一旦Flash加载,页脚div就不显示了。 我的文件没有图片。由于某种原因,Flash正在弄乱它。
我的CSS如下:
#wrapper {
width:90%;
margin:0px;
border:0px solid #bbb;
padding:0px;
}
#header {
border:0px solid #bbb;
padding:0px;
background-image:url("Images/sclogo_01.png");
text-align: center;
width: 100%;
height:50px;
background-position:center;
}
#content {
margin-top:0px;
padding-bottom:0px;
border:1px;
}
#content div {
padding:0px;
border: 0px;
float:none;
width:100%;
height:100%;
}
#content-main {
margin-left:0px;
width:100%;
height:100%;
padding: 0;
position: absolute;
}
#footer {
background-image:url("Images/sclogo_03.png");
text-align: center;
width: 100%;
height:50px;
float:left;
background-position:center;
font-size: large;
}
答案 0 :(得分:1)
我认为你应该尝试SWFObject:https://code.google.com/p/swfobject/
这个例子来自他们的文档,看起来它可能会为你做到这一点:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject dynamic embed - step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
</script>
</head>
<body>
<div id="myContent">
<p>Alternative content</p>
</div>
</body>
</html>
下载,设置和修改,试一试,让我知道它是如何运作的。