網(wǎng)頁設(shè)計之網(wǎng)頁音樂的實現(xiàn)技巧

2024-02-25    分類: 網(wǎng)站建設(shè)

當(dāng)網(wǎng)頁中插入音樂時,要根據(jù)不同的后綴名,來寫不同的代碼!下面面就是多種格式文件的詳細(xì)使用代碼。

注:

"音樂文件和地址"——待播放文件的文件名,前面帶上絕對路徑,或者本站的相對路徑。

width_num——指定一個作為寬度的數(shù)字;

height_num——指定一個作為高度的數(shù)字;

1.mid

<embed src="音樂文件和地址" type="audio/midi" hidden="false" autostart="true" loop="true" height=height_num width=width_num></embed> 2.mp3

<embed controller="true" width="width_num" height="height_num" src="音樂文件和地址" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed> 3.avi

<embed src="音樂文件和地址" border="0" width="width_num" height="height_num" type="application/x-mplayer2"></embed> 4.flash

<embed src="音樂文件和地址" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="width_num" height="height_num" play="true" loop="true" quality="high" scale="showall" menu="true"></embed> 5.mpg

<embed src="音樂文件和地址" border="0" width="width_num" height="height_num" type="application/x-mplayer2"></embed> 6.mov

<embed controller="true" width="width_num" height="height_num" src="音樂文件和地址" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed>

7.rm

<OBJECT>" height="height_num"> <PARAM NAME="CONTROLS" VALUE="ImageWindow"> <PARAM NAME="AUTOSTART" Value="true"> <PARAM NAME="SRC" VALUE="音樂文件和地址"> <embed height="高" width="寬" controls="ImageWindow" src="音樂文件和地址" type="audio/x-pn-realaudio-plugin" autostart="true" nolabels="0" autogotourl="-1"></OBJECT> 8.上面的都是使用播放器的,如果只是想播放背景音樂的話可以使用如下簡單語句:

<bgsound src="音樂文件和地址" loop=1> loop后面是循環(huán)的次數(shù),-1代表無限循環(huán)。

本文來源于成都網(wǎng)站建設(shè)公司與成都網(wǎng)站設(shè)計制作公司-創(chuàng)新互聯(lián)成都公司!

文章名稱:網(wǎng)頁設(shè)計之網(wǎng)頁音樂的實現(xiàn)技巧
地址分享:http://www.muchs.cn/news12/318762.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計、軟件開發(fā)、網(wǎng)站制作響應(yīng)式網(wǎng)站、App開發(fā)、小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

手機網(wǎng)站建設(shè)