html - 一首歌曲完成后如何设置自动播放、循环播放和多首歌曲?
问题描述
这就是我到目前为止所做的
<div>
<iframe src="/music/song1.mp3" style="position:absolute;top:0;left:0;width:100%;height:100%;" width="1400" height="900" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen>
</iframe>
</div>
谢谢
解决方案
使用<audio>
html 元素并添加autoplay loop
<audio autoplay loop controls>
<source src="/music/song1.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
推荐阅读
- java - Eclipse Win10 上的 JavaFX“图形设备初始化失败:d3d,sw”
- reactjs - 如何在 React Native 中本地存储从 API 检索到的数据?
- java - 使用 pushmatrix() 函数显示消息的可点击 3d 形状?
- html - 如何移动按钮上可以看到的图片的哪一部分?
- python - Python np.append 不适用于 numpy.ndarray 类型的字典值
- python - 亚马逊 lambda 函数不接受帖子
- python - 允许用户使用数据分发 Django Web App
- c++ - 如何在继承类中调用 ui 对象
- python - Python套接字:可以发送字符串但不能发送“输出”(从套接字断开)
- c# - 将 NuGet contentFiles 传递复制到引用的项目