Home > Web Front-end > HTML Tutorial > Does html5 audio support fade-in and fade-out effects? _html/css_WEB-ITnose

Does html5 audio support fade-in and fade-out effects? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:55:17
Original
1756 people have browsed it

As per the title, I want to achieve the fade-in and fade-out effect. How to achieve it? Thank you!


Reply to discussion (solution)

Adjust transparency?
Fade in: $('audio').animate({opacity:0},5000)
Fade out: $('audio').animate({opacity:1},5000)

It's not the fade in and out of the picture, it's the fade in and out of the sound

Adjust the transparency?
Fade in: $('audio').animate({opacity:0},5000)
Fade out: $('audio').animate({opacity:1},5000)

You can use a timer to modify the volume regularly to create a fade-in and fade-out effect

You can use a timer to modify the volume regularly to create a fade-in and fade-out effect


Monitor playback Duration, and then set the conditions to play

Thank you everyone, you can set the timing to adjust and reduce the volume to achieve this.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template