开发者

Adding sound in a web site

How can I add sound to a web site . I don't want to show .swf player in t开发者_StackOverflowhe page .music should play in the background


You can use the <audio> tag, but check if that is supported in all browsers you are interested in. If not, you can use an invisible swf.

But I'd recommend you not to putting background sound into the site, it tends to be really annoying.


Hide the div element inside which you put the swf object, in the page. Set the display state to none instead of block. Something Like :

<div style="display:none;">

<Your swf object>

</div>


It's old but it works.

9 Versions to play a sound on a web page

I've used version 8 "Using a Java Applet called from JavaScript" for firefox and IE8.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜