Don't do it. One of the most annoying things in the world is music on a webpage. If absolutely MUST embed an MP3, please, please, please, provide a way for the user to turn it off and/or mute it.
that being said, here is an article with a couple of ways to play an MP3 on your page.
Too short, didn't understand it: don't do it, it's fastidious on just about every level: you waste your bandwidth, you waste user's bandwidth, you waste user's PC resources to run a plugin (be it Flash or whatever), you make browsing between pages slower (because the music has to be started each time), but, most important, you make the users of your site hate it because 99% of them just want to read the darn pages and do not care at all about your music.
发布评论
评论(2)
不要这样做。世界上最烦人的事情之一就是网页上的音乐。如果绝对必须嵌入 MP3,请、请、请为用户提供一种将其关闭和/或静音的方法。
话虽这么说,这里有一篇文章在您的页面上播放 MP3 的几种方法。
Don't do it. One of the most annoying things in the world is music on a webpage. If absolutely MUST embed an MP3, please, please, please, provide a way for the user to turn it off and/or mute it.
that being said, here is an article with a couple of ways to play an MP3 on your page.
(强制 xkcd 参考,CW,因为它不是真正的答案)
Alt-text:就像他们聚在一起说‘1998 年我们最怀念互联网上的什么?没错,嵌入式 MIDI!'
(链接)
太短了,没有不明白:不要这样做,它几乎在各个层面都很挑剔:你浪费了你的带宽,你浪费了用户的带宽,你浪费了用户的带宽运行插件(无论是 Flash 还是其他什么)的 PC 资源,会使页面之间的浏览速度变慢(因为每次都必须启动音乐),但最重要的是,您会让网站的用户讨厌它,因为 99%他们只想阅读该死的页面,根本不关心你的音乐。
(mandatory xkcd reference, CW because it's not a real answer)
Alt-text: It's like they got together and said 'what do we miss most from the internet in 1998? that's right, embedded MIDI!'
(link)
Too short, didn't understand it: don't do it, it's fastidious on just about every level: you waste your bandwidth, you waste user's bandwidth, you waste user's PC resources to run a plugin (be it Flash or whatever), you make browsing between pages slower (because the music has to be started each time), but, most important, you make the users of your site hate it because 99% of them just want to read the darn pages and do not care at all about your music.