Cambio progresivo de color de fondo
AUTOR PREGUNTA #1
-
¿Tienes la misma pregunta? Yo también
Esto también te interesa!
PREGUNTAS SIMILARES
#2
Por ejemplo
div
{
-webkit-animation: myfirst 5s; /* Chrome, Safari, Opera */
animation: myfirst 5s;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes myfirst
{
from {background: red;}
to {background: yellow;}
}
/* Standard syntax */
@keyframes myfirst
{
from {background: red;}
to {background: yellow;}
}
#4
<script language="Javascript">
function random_color()
{
return "#"+("000"+(Math.random()*(1<<24)|0).toString(16)).substr(-6)
}
$(function(){
$('html').css('background-color','black');
//click en boton
$('#boton').click(function() {
$('html').animate({
'background-color': random_color()
}, 900);
});
});
</script>