【问题标题】:I am trying to loop an embeded mp3 file on my page. I got the sound working, however I am having issues getting it to loop. Please Assist? [duplicate]我正在尝试在我的页面上循环嵌入的 mp3 文件。我让声音正常工作,但是我在让它循环时遇到问题。请协助? [复制]
【发布时间】:2018-09-18 06:18:54
【问题描述】:

我正在尝试循环播放声音文件,但无法找到解决方案。

<embed class="audio" src="D:\Sublime Text 3\first\Clock-ringing.mp3">

【问题讨论】:

标签: html css loops audio autoplay


【解决方案1】:

使用audio 标签:

 <audio autoplay loop>
   <source src="D:\Sublime Text 3\first\Clock-ringing.mp3" type="audio/mpeg">
 </audio> 

【讨论】:

    【解决方案2】:

    你也可以使用:

    <embed class="audio" src="D:\Sublime Text 3\first\Clock-ringing.mp3" loop="true">
    

    【讨论】:

      【解决方案3】:

      谢谢。我对其进行了调整,以便隐藏控件和自动播放。

       <audio controls autoplay loop>
         <source src="D:\Sublime Text 3\first\Clock-ringing.mp3" type="audio/mpeg">
       </audio> 
      
      <style>
          audio {
          display: none;
        }
      </style>
      

      【讨论】:

      • 与其说谢谢,不如接受给定的答案之一。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-12-11
      • 1970-01-01
      • 2015-09-15
      • 2017-05-19
      • 2015-11-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多