中心闪光元素基于元素实际大小 [英] center flash element based on the elements actual size
问题描述
我在将div元素放置在div标签中时遇到问题。问题是,flash元素正在根据用户输入更改其大小。我需要一个方法如何动态获取flash元素的实际大小,并更改div元素的行为集成到flash中。实际上我想把它放在div的中间。
I have a problem positioning a Flash element inside a div tag. The problem is, that the flash element is changing it's size based on the user input. I need a way how I can dynamically get the actual size of the flash element, and to change the behavior of the div element the flash is integrated in. actually I want to place it in the middle of the div.
现在我给的flash元素的宽度和高度为100%,但这样我不能将元素放在div ...
right now I gave the flash element width and height of 100% but that way I can not center the element inside the div...
任何解决方案?我可能需要javascript权限吗?
Any solution? I might need javascript right? Im a newby in javascript!
Maechi
推荐答案
:
<div id="container">
<object id="#flash">...</object>
</div>
您可以试试这个css:
you can try this css:
#container {
width: <larger or equeals than max flash width>px;
}
#flash {
margin: 0 auto;
}
这篇关于中心闪光元素基于元素实际大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!