开发者

Play sound on mouse hover using Javascript

开发者 https://www.devze.com 2023-01-01 12:37 出处:网络
Is it possible play song on mouse h开发者_如何学Cover using javascript? If yes then how to code for it.Nope, that\'s not possible. You need javascript for that.I don\'t think you can do this with CSS.

Is it possible play song on mouse h开发者_如何学Cover using javascript? If yes then how to code for it.


Nope, that's not possible. You need javascript for that.


I don't think you can do this with CSS. You can, however, use JavaScript to trigger an audio element to play when any other element is moused over.


If your audience is using screen readers it may be possible with aural style sheets:

http://www.w3.org/TR/CSS2/aural.html

blockquote.sad { play-during: url("violins.aiff") }
0

精彩评论

暂无评论...
验证码 换一张
取 消