Play sound on mouse hover using Javascript
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") }
精彩评论