html怎么设置点击播放⾳乐,html5点击播放⾳乐试听按钮动画
特效
特效描述:html5 点击播放 ⾳乐试听 按钮动画特效。html5⿏标滑过或点击播放⾳乐试听特效
代码结构
1. 引⼊CSS
2. 引⼊JS
3. HTML代码
function怎么记忆Examples
eventType :
HOVER!
CLICK!
$(function(){
$('#trigger-2-hover').easyAudioEffects({
ogg : "./assets/",
mp3 : "./assets/audio/chime.mp3",
eventType : 'hover'
});
$('#trigger-2-click').easyAudioEffects({
ogg : "./assets/",
mp3 : "./assets/audio/chime.mp3",
eventType : 'click'
});
});
$('.selector').easyAudioEffects({
ogg : "./path/",
mp3 : "./path/to/sound.mp3",
eventType : "hover" // or "click"
});
playType :
playType : "oneShotPolyphonic"
TRACE!
BARRAGE!
$(function(){
$('.oneShotPolyphonic-hover').easyAudioEffects({
ogg : "./assets/",
mp3 : "./assets/audio/chime.mp3",
eventType : "hover",
playType : "oneShotPolyphonic"
});
$('.oneShotPolyphonic-click').easyAudioEffects({
ogg : "./assets/",
mp3 : "./assets/audio/chime.mp3",
eventType : "click",
playType : "oneShotPolyphonic"
});
});
$('.selector').easyAudioEffects({
ogg : "./path/",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "oneShotPolyphonic"
});
playType : "oneShotMonophonic"
TRACE!
BARRAGE!
$(function(){
$('.oneShotMonophonic-trigger-hover').easyAudioEffects({ ogg : "./assets/",
mp3 : "./assets/audio/chime.mp3",
eventType : 'hover',
playType : 'oneShotMonophonic'
});
$('.oneShotMonophonic-trigger-click').easyAudioEffects({
ogg : "./assets/",
mp3 : "./assets/audio/chime.mp3", eventType : 'click',
playType : 'oneShotMonophonic'
});
});
$('.selector').easyAudioEffects({
ogg : "./path/",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "oneShotMonophonic"
});
playType : "gate"
HOVER!
CLICK!
$(function(){
$('.gate-trigger-hover').easyAudioEffects({ ogg : "./assets/",
mp3 : "./assets/audio/cat.mp3", eventType : 'hover',
playType : 'gate'
});
$('.gate-trigger-click').easyAudioEffects({ ogg : "./assets/",
mp3 : "./assets/audio/cat.mp3", eventType : 'click',
playType : 'gate'
});
});
$('.selector').easyAudioEffects({
ogg : "./path/",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "gate"
});
playType : "loop"
HOVER!
CLICK!
$(function(){
$('.loop-trigger-hover').easyAudioEffects({ ogg : "./assets/",
mp3 : "./assets/audio/numbness.mp3", eventType : 'hover',
playType : 'loop'
});
$('.loop-trigger-click').easyAudioEffects({ ogg : "./assets/",
mp3 : "./assets/audio/numbness.mp3", eventType : 'click',
playType : 'loop'
});
});
$('.selector').easyAudioEffects({
ogg : "./path/",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "loop"
});
$(function(){
$('a').easyAudioEffects({
ogg : "./assets/",
mp3 : "./assets/audio/pi.mp3",
eventType : 'hover' });
});
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论