这是我的HTML:
<p>
Ut molestie venenatis enim mattis cursus. Duis lacinia mauris nec nulla rutrum condimentum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin et felis mi. Ut posuere, eros in vulputate auctor, ante dui egestas metus, in pulvinar dolor mauris eget enim. Fusce in nunc sit amet elit facilisis congue. Nunc malesuada, nibh pretium viverra rutrum, diam nibh congue lacus, a pretium lorem turpis vitae felis. Curabitur nec lectus in velit dictum fringilla et non risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam tincidunt ornare libero quis cursus. Cras varius pharetra pellentesque. Sed fermentum felis vitae enim vulputate placerat.</p>
<p>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="/clientarea/utils/locate-flash?path=high">
<param name="movie" value="/clientarea/utils/locate-flash?path=data%2Fmedia%2Fflash%2F4.swf">
<embed pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="/clientarea/utils/locate-flash?path=data%2Fmedia%2Fflash%2F4.swf" type="application/x-shockwave-flash"></embed></object></p>
<p>
In sapien libero, aliquet eget ornare sed, suscipit ut turpis. Donec eget magna massa, vitae ullamcorper metus. Nullam ac lectus eu magna convallis auctor. Nam in massa urna, vel placerat felis. Nulla fermentum felis ut libero sagittis et pretium mi pretium. Cras quis urna id massa fringilla porta sed fringilla magna. Duis in neque ac lectus rhoncus sagittis. Integer augue est, congue non interdum condimentum, egestas a tellus. Nulla consectetur, justo ac fermentum gravida, dolor nunc posuere odio, placerat lobortis lacus orci et justo. Praesent commodo mattis ligula in pulvinar. Nunc interdum vulputate dolor, at malesuada sapien luctus at. Sed suscipit turpis in tellus interdum vehicula. Sed quis velit enim. Maecenas placerat ullamcorper sollicitudin.</p>
基本上,我将flash动画插入带有object,param,embed标签的文本中。
然而,上面有一个未见的差距,并且在flash动画下面(我猜是大约40px)。
我已经为object,param和embed标签重置了margin和padding。差距仍然存在。我该如何解决这个问题?
注意:我知道我可以将width和height属性与object标签一起使用,但是将flash动画插入HTML的用户将不知道他们的尺寸,因此他们将无法插入这些参数。
答案 0 :(得分:4)
尝试将object
设为display:block
。默认情况下,“对象”为display-inline
,这意味着它可以继承line-height
。另外,我建议先将其从<p>
标签中删除!
答案 1 :(得分:3)
请尝试使用<div>
替换包含的段落,因为默认情况下段落具有填充和边距。
如果这不起作用,则可能值得添加背景颜色(尽可能强烈,暴力和丑陋 - 以帮助您记住将其更改回来!)并尝试找出填充或边距为来自(哪里。您可能更有可能确定需要从哪里移除。