HTML Embed object has a grey background. Can it be

2019-07-09 13:49发布

I'm using Firefox with an opensource plugin to playback video. The video is scaled "as good as possible" to fit the available space defined in the width and height of the embed object. But sometimes there is a little grey border on the right and/or bottom.

It seems this isn't the bgcolor of my parent div as changing it has no effect at all.

This is the HTML:

<div id="videoHolder" style="position: absolute; left: 50px; top: 50px; width: 300px; height: 150px;">
 <embed id="player" width="300" height="150" border="0" type="application/x-gbp" x-gbp-uri="">
</div>

Anyone knows of a way to define an embed to be transparent? Setting wmode=transparent as with Flash has no effect...

Thanks, Frank

2条回答
女痞
2楼-- · 2019-07-09 14:24

Try adding the "wmode" attribute and setting it's value to "transparent":

<div id="videoHolder" style="position: absolute; left: 50px; top: 50px; width: 300px; height: 150px;">
    <embed WMODE="transparent" id="player" width="300" height="150" border="0" type="application/x-gbp" x-gbp-uri="">
</div>
查看更多
家丑人穷心不美
3楼-- · 2019-07-09 14:26

There is no general way to tell plugin elements to be transparent from the browser-side, plugins need to support that themselves in their native code.

For Flash setting the wmode="transparent" works, but only because Flash implements that itself.

查看更多
登录 后发表回答