如何摆脱< embed>周围的空白区域元件? [英] How to get rid of white space around an <embed> element?

查看:126
本文介绍了如何摆脱< embed>周围的空白区域元件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总结:100%宽度和高度的嵌入将其父母尺寸推到祖父母的100%宽度和高度。我如何获得嵌入元素来折叠它周围的所有空白区域,以便它完全符合其父级的宽度和高度?

我有一个页面上有一个图片,被点击时被一个播放quicktime电影的嵌入元素所取代。



问题是嵌入式电影有大量的空白

 <!DOCTYPE html PUBLIC -  // W3C // DTD XHTML 1.0 Strict // ENhttp ://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> 
< html xmlns =http://www.w3.org/1999/xhtml>
< head>< title>< / title>< / head>
< body>
< div style =border:1px solid#000;>
< / div>
< / body>
< / html>

视频尺寸未知,因此如何在保留高度和宽度的同时清除此空白100%?



编辑:虽然它不显示,但我实际上是清除填充和边距。编辑2:有问题的空白区域位于电影和黑色边界之间,而不是黑色边框和浏览器。


解决方案

事实证明,除了通过使用 scale =aspect。



虽然不是完美的解决方案,但现在必须做。


SUMMARY: an embed with 100% width and height pushes its parents size to be 100% width and height of the grandparent. How do I get the embed element to collapse all the white space around it so that it fits the width and height of its parent perfectly?

I have a page with an image, which upon being clicked gets replaced by an embed element that plays a quicktime movie.

The problem is that the embedded movie has a large amount of white space around it.

<!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">
    <head><title></title></head>
    <body>
        <div style="border:1px solid #000;">
        <embed id="iframeMovie" height="100%" width="100%" controller="true" target="myself" href="" src="http://images.apple.com/quicktime/troubleshooting/mov/qt_installed.mov" type="video/quicktime"></embed>
        </div>
    </body>
</html>

The video is of unknown size so how do I get rid of this whitespace while leaving height and width at 100%?

EDIT: Though it doesn't show, I am actually clearing the padding and margins. The white space still remains.

EDIT 2: The white space in question is between the movie and the black border, not the black border and the browser.

解决方案

it turns out that theres no way of doing this other than making the movie scale to the size of the parent by using scale="aspect".

While not the perfect solution, it will have to do for now.

这篇关于如何摆脱&lt; embed&gt;周围的空白区域元件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆