我正在尝试定位我的 Flex 应用程序,使其位于页面的更下方,但我无法使其正常工作。它仍然出现在左上角。这是 HTML,我们将不胜感激!
<html lang="en">
<head>
<title>Page</title>
<style type="text/css">
body { margin: 0px; overflow: hidden; }
#swf {top:50%;}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF( "link_to_the_swf", "swf", "100%", "100%", "10.0.0", "playerProductInstall.swf", flashVars, params );
</script>
</head>
<body scroll="no">
<div id="swf">
<p>Alternative content</p>
</div>
</body>
</html>
编辑:阅读后this message ,我尝试将 swf div 包装在另一个 div 中并在父 div 上设置 top 属性,但它没有用。
最佳答案
您不能单独使用 top
。您需要给 div
position: relative
或使用 margin-top
/padding-top
。
关于css - 尝试在 SWF 文件上使用 CSS top 属性,但它不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2897570/