已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 讨论/求助

标题: 谁帮提取这里右上角音乐代码,

作者: @Ta

时间: 2015-09-17

点击: 2373

http://wap.gx.10086.cn/services/jkzl.jsp

[隐藏样式|查看源码]


『回复列表(4|隐藏机器人聊天)』

1. @黑豹传奇
将以下代码放到body标签下面:
<style type="text/css">
body{background:#082336;}
.btnAudio{ width:36px; height:36px; position:absolute; right:30px; top:18px; overflow:hidden; background:url("http://cyun.aliapp.com/disk/view.php/7a1a6d1c1426c7ce866712f1c058b69d.png") left top no-repeat; z-index:100;}
.rotate1circle{-webkit-animation:rotate1circle 1s linear infinite;}
@-webkit-keyframes rotate1circle {
	0% {
		-webkit-transform-origin:center center;
		-webkit-transform:rotate(0deg);
	}
	100% {
		-webkit-transform-origin:center center;
		-webkit-transform:rotate(360deg);
	}
}
</style>

<section class="u-audio hidden" data-src="http://wap.gx.10086.cn/xhtml/images/healthassist/bgmusic.mp3"></section>
<div class="btnAudio" id="btnAudio"></div>

<script>
var bg_audio_val = true;
var bg_audio = new Audio();
function audio_init(){
	var options_audio = {
		loop: true,
		preload: "auto",
		src: $('.u-audio').attr('data-src')
	}
	for (var key in options_audio) {
		bg_audio[key] = options_audio[key];
	}
	bg_audio.load();
	audio_addEvent();
	bg_audio.play();
}
function audio_addEvent(){
	$("#btnAudio").on('click', audio_control);
	$(bg_audio).on('play',function(){
		bg_audio_val = false;
		$('#btnAudio').addClass('rotate1circle');
	})
	$(bg_audio).on('pause',function(){
		$('#btnAudio').removeClass('rotate1circle');
	})
}
function audio_control(){
	if(!bg_audio_val){
		bg_audio.pause();
		bg_audio_val = true;
	}else{
		bg_audio.play();
	}
}
audio_init();
</script>
(/@Ta/2015-09-17 15:43//)

2. .
(/@Ta/2015-09-17 16:40//)

3. @net909,谢了。
(/@Ta/2015-09-18 17:35//)

4. @net909,免费版的修复了吗
(/@Ta/2015-09-18 20:40//)

回复需要登录

7月1日 06:32 星期二

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1