当前位置:网站首页>开区网站打开自动播放音乐的添加跟修改教程
开区网站打开自动播放音乐的添加跟修改教程
2022-07-29 05:06:00 【V13807970340】
1、插入音乐视频的代码
在网页中插入播放声音(如mp3等)、AVI动画和电影文件(如MPG等)的代码:
在代码窗口中的<body>和</body>之间插入以下代码:
<Embed src="url"width="宽度"height="高度"AUTOSTART="TRUE│false" LOOP="TRUE"></Embed>
【注解】
<EMBED…………………起始标记
SRC="url"……………源文件名
width="450"…………播放器的宽度
height="380"…………播放器的高度
HIDDEN="TRUE"………隐藏方式(对播放声音文件有用,对播放视频无用)
AUTOSTART="TRUE"……自动播放
autostart="false"……不自动播放,点击播放按钮后才播放。
LOOP="TRUE"…………循环播放
NAME="MySound"………嵌入对象名
</EMBED>………………结束标记
【例3】打开网页并点击播放器的播放按钮后才播放视频文件kkk.mpg:
<Embed src="kkk.mpg"width="450"height="380" autostart="false" ></Embed>
【技巧】此法对制作课件特别有用,可在网页当前页播放视频动画。但是,打开网页时播放器总在网页的左侧,如何定位播放器的位置呢?其实插入此代码可以在设计视图中利用层来完成,实现方法是:在DW中的设计视图,插入层,鼠标定位于层内,在层内插入代码(按右键\点插入HTML,在弹出的“插入HTML<>”窗口中的括号<>中间输入代码。如果要编辑修改代码,这样做:右击标签\编辑标签。)。通过移动层就可以准确定位播放器的位置了。
【视频格式转换】用超级解霸或会声会影可将VCD中的某个视频文件(.DAT)转换为视频文件(.mpg)。
【例4】打开网页后自动播放(就象背景音乐)声音文件mlh.mp3:
<Embed src="mlh.mp3" HIDDEN="TRUE" AUTOSTART="TRUE"></Embed>
2、插入播放背景音乐(wav、midi、mp3)的代码
只要在代码窗口中的<head>和</head>标签之间以下代码即可:
<bgsound src="Music File Name" loop=n>
【注】①Music File Name是背景音乐文件名,其格式可以是:.mid,.mp3,.wav,.wma,.rmi。
②n表示循环次数,若n为-1则表示无限循环。
③网页文件和音乐文件要在同一文件夹中。
【例5】无限循环播放背景音乐mlh.mp3:
<bgsound src="mlh.mp3" loop="-1">
边栏推荐
- SGuard64.exe ACE-Guard Client EXE:造成磁盘经常读写,游戏卡顿,及解决方案
- 五个关联分析,领略数据分析师一大重要必会处理技能
- pulsar起client客户端时(client,producer,consumer)各个配置
- 那个准时上下班,从不愿意加班加点的人,在我前面升职了...
- P2181 diagonal
- EMI interference troubleshooting with near-field probe and current probe
- 学习数据库的第一个程序
- Take you to understand JS array
- On prepayment of house purchase
- 如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然
猜你喜欢

深度学习刷SOTA的一堆trick

How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally

WPS插入超链接无法打开,提示“无法打开指定文件”怎么办!

五个关联分析,领略数据分析师一大重要必会处理技能
![[untitled]](/img/6c/df2ebb3e39d1e47b8dd74cfdddbb06.gif)
[untitled]

SGuard64.exe ACE-Guard Client EXE:造成磁盘经常读写,游戏卡顿,及解决方案

iOS面试准备 - ios篇

【2022新生学习】第三周要点

What if the computer cannot open excel? The solution of Excel not opening

Solve the warning prompt of MySQL mapping file
随机推荐
Word如何查看文档修改痕迹?Word查看文档修改痕迹的方法
C language implementation of three chess
stack和queue和优先级队列(大堆和小堆)模拟实现和仿函数讲解
EMI interference troubleshooting with near-field probe and current probe
Traffic flow prediction pit climbing record (I): traffic flow data set, original data
Use annotation test in idea
Office提示系统配置无法运行怎么办?
pytorch学习笔记
Learn matlab to draw geographical map, line scatter bubble density map
office2010每次打开都要配置进度怎么解决?
[untitled]
新产品上市最全推广方案
[wechat applet] swiper slides the page, and the left and right sides of the slider show part of the front and back, showing part of the front and back
2021-10-23
Unity Metaverse(三)、Protobuf & Socket 实现多人在线
Excel怎么筛选出自己想要的内容?excel表格筛选内容教程
How to set row height and column width in excel? The method of setting row height and column width in Excel
On prepayment of house purchase
JS daily question (11)
Download addresses of various versions of MySQL and multi version coexistence installation