简体   繁体   English

如何在swfObject中设置背景颜色?

[英]How do I set the background color in swfObject?

I am using swfobject to display some Flash content (please don't tell Steve Jobs) and I need to set the background color of the swfobject content to black so it blends nicely with the black page it is on. 我正在使用swfobject显示一些Flash内容(请不要告诉Steve Jobs),并且我需要将swfobject内容的背景色设置为黑色,以便与打开的黑色页面完美融合。

I tried using the following code but it didn't change anything: 我尝试使用以下代码,但没有任何改变:

<object id="flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="600" bgcolor="#000">

What is the correct way to set the background color to #000000? 将背景颜色设置为#000000的正确方法是什么?

Thanks. 谢谢。

I got some help over at the swfobject group on google. 我在Google的swfobject组上获得了一些帮助。

The key is to add this to both sections of the object code and it solved the problem: 关键是将其添加到目标代码的两个部分中,从而解决了该问题:

<param name="bgcolor" value="000000" /> 

if you want to set the flash background colour then you have to use the bgcolor setting in embedding, or add it to swfObject with the 6th value ( see here ). 如果要设置Flash背景色,则必须在嵌入时使用bgcolor设置,或将其添加到第6个值的swfObject中( 请参见此处 )。 if you are using a transparent flash etc then the colour is defined by your html/CSS content. 如果您使用的是透明闪光灯等,则颜色由html / CSS内容定义。 have a check of your background or background-color settings for the div you are embedding it into. 检查您要嵌入的div的backgroundbackground-color设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM