免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
Board logo

标题: 简易换页不换歌小型音乐播放器 [打印本页]

作者: flashroad    时间: 2018-8-18 19:12     标题: 简易换页不换歌小型音乐播放器

代码中引用了网易云音乐的外链播放器,当然实际上也可以用其他平台的音乐播放器

进入header模板,在最上面加上
  1.     <!--{if !array_key_exists('HTTP_REFERER',$_SERVER)}-->
  2.             <!DOCTYPE HTML>
  3.             <html>
  4.                     <head>
  5.                             <meta charset="utf-8"/>
  6.                             <title>$navtitle $bbname $seotitle</title>
  7.                             <meta name='viewport' content='width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' />
  8.                             <meta name="format-detection" content="telephone=no"/>
  9.                             <style>
  10.                                     *{
  11.                                             padding:0;
  12.                                             margin:0;
  13.                                             border:none;
  14.                                             font:16px/1.6em 微软雅黑,Verdana,Helvetica,Arial,sans-serif;
  15.                                             text-decoration:none;
  16.                                     }
  17.                                     body,html,#main{
  18.                                             width:100%;
  19.                                             height:100%;
  20.                                             overflow:hidden;
  21.                                     }
  22.                                     #music{
  23.                                             position:fixed;
  24.                                             left:0px;
  25.                                             bottom:0px;
  26.                                             z-index:500;
  27.                                     }
  28.                             </style>
  29.                     </head>
  30.                     <body>
  31.                             <div id="music">
  32.                                     <!--此处插入你的音乐播放器代码-->
  33.                             </div>
  34.                             <iframe id="main" frameborder="no" border="0" marginwidth="0" marginheight="0" src="http://<!--{echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];}-->"></iframe>
  35.                     </body>
  36.             </html>
  37.             {eval die;}
  38.     <!--{/if}-->
复制
注意把中间“此处插入你的音乐播放器代码”的那里加上你从音乐网站获取的播放器代码
如果没有的话也可以直接用我的:
  1.     <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=110 src="http://music.163.com/outchain/player?type=0&id=10697121&auto=1&height=90"></iframe>
复制

作者: flashroad    时间: 2018-10-23 23:20

他[她]看完这篇文章说:

(来自快速回帖模式)
作者: 虚心    时间: 2019-1-12 20:51

他[她]看完这篇文章说:

(来自快速回帖模式)




欢迎光临 flash之路-flash技术交流 (http://flashroad.joinbbs.net/) Powered by Discuz! 7.2