zoukankan      html  css  js  c++  java
  • 关于谷歌浏览器不能播放背景音乐的问题(与IE的不同之处)

                                        第一篇博文

                          忍受寂寞,抵制诱惑,持之以恒。

    开发时,以下代码在IE浏览器上能顺利播放背景音乐,可在谷歌浏览器上却没有动静。

    <html>
    <body>
    <bgsound src="F:KuGouS.H.mp3" loop="-1"> </bgsound>
    </body>
    </html>

    解决方法:用html5中的audio标签来代替bgsound标签。既:
    <audio src="F:KuGouS.H.mp3"autoplay="true"> </audio>

    当然了,为了适应更多的浏览器可以两种方式都写上:


    <html>
    <body>

    <bgsound src="F:KuGouS.H.mp3" loop="-1"> </bgsound>
    <audio src="F:KuGouS.H.mp3"autoplay="true"> </audio>

    </body>

    </html>


     

  • 相关阅读:
    memory addresses
    ddt ddl dml
    PHP Architecture
    disk_free_space
    SAPI
    Simple Mail Transfer Protocol
    AllowOverride None
    function &w(){}
    The History of Operating Systems
    are not called implicitly
  • 原文地址:https://www.cnblogs.com/chayangge/p/4288713.html
Copyright © 2011-2022 走看看