• 我的项目7 js 实现歌词同步(额,小小的效果)


    在项目中须要做一个播放器,还要实现歌词同步的效果,就跟如今搜狗音乐的歌词同步差点儿相同,在网上查了一些关于这方面的。整理了一下,在这里,其有用这种方法能够吗?

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8" />
    		<title></title>
    		<script type="text/javascript" src="js/jquery.min.js" ></script>
    		<script type="text/javascript">
    			window.setInterval("dd()",200);
    			var i=0;
    			function dd(){
    				i=i+10;
    				//alert(i)
    				document.getElementById("mydiv2").style.width=i+"px"; 				
    			}
    			function x(){
    				//alert("-----")
    				document.getElementById("mydiv2").style.color="red";
    			}
    		</script>
    		
    	</head>
    
    	<body>
            <div class="mydiv1" style="position: absolute; z-index: 1;">
            	<h1>影月莹莹哈哈哈哈哈哈</h1>
            </div>
            <div  class="mydiv2" id="mydiv2" style="position: absolute; z-index:2; color: blue;  100px; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
            	<h1>影月莹莹哈哈哈哈哈哈</h1>
            </div>
            <button id="mybutton" onclick="x()" style="height: 100px;  200px; margin-top: 100px;">电机 </button>
    	</body>
    
    </html>
    
    在这里。。我用了一个这样的方法。不知行不行的通 。。至于歌词同步,就调时间吧。向网上一些博客,,看了都是须要AJAX解析歌曲文件,获取歌词,歌词时间。实现歌词同步,在这里。假设仅仅是一两首歌曲,自己调一调时间也行吧。。。。。至于大家有什么看法。。额额。。。嘿嘿

  • 相关阅读:
    最大熵模型
    python安装深度学习包theano,Pylearn2,scikit-neuralnetwork
    sklearn之learningcurve
    sklearn之validationcurve
    SVM
    一年7篇CVPR和4篇ICCV——女神
    CUDA大作业_进行图像特征匹配V2.0
    CUDA大作业_进行图像特征匹配V1.0
    从K近邻算法、距离度量谈到KD树、SIFT+BBF算法
    Ubuntu 开机出现 grub rescue> 终端模式修复方法
  • 原文地址:https://www.cnblogs.com/mthoutai/p/6761496.html
Copyright © 2020-2023  润新知