Pues bueno. Aquí he terminado la animación. Gracias por la ayuda y lo siento por lo de antes, kseso?.
No, Siroguh, no me he "cagado".
Ahora viene otra pregunta. ¿Es posible hacer que, por ejemplo, después de una
animación (en la que he cambiado el background a rojo, en 1s) se quede PARA
SIEMPRE el background de color rojo?.
Por cierto, se me olvidaba, lo prometido es deuda:
Código:
<!DOCTYPE html>
<html>
<head>
<title>Animaciones de Prueba</title>
<style type="text/css">
#cara{
width:405px;
height:400px;
background:rgba(176,174,174,1);
border:1px solid #333;
border-radius:138px;
border-bottom-left-radius:69%;
border-bottom-right-radius:69%;
margin:0 auto;
margin-top:100px;
}
.anime{
width:200px;
height:200px;
margin:0 auto;
position: relative;
border:10px red;
display:inline-block;
}
.anime2{
width:200px;
height:200px;
margin:0 auto;
position: relative;
border:10px red;
display:inline-block;
}
#boca{
width:300px;
height:50px;
background:#296e29;
margin:0 auto;
margin-top:50px;
border-radius:10px;
border-bottom-left-radius:100%;
border-bottom-right-radius:100%;
}
#bocamod{
width:300px;
height:20px;
background:rgba(176,174,174,1);
margin:0 auto;
margin-top:0;
border-bottom-left-radius:100%;
border-bottom-right-radius:3%;
}
#a1{
width:200px;
height:200px;
border-radius:100px;
display: block;
vertical-align: middle;
position: absolute;
left: 50%;
top: 50%;
margin-top: -100px;
margin-left: -100px;
}
#a2{
width:180px;
height:180px;
border-radius:90px;
display: block;
position: absolute;
left: 50%;
top: 50%;
margin-top: -90px;
margin-left: -90px;
}
#a3{
width:160px;
height:160px;
border-radius:80px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -80px;
margin-left: -80px;
}
#a3{
width:140px;
height:140px;
border-radius:70px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -70px;
margin-left: -70px;
}
#a4{
width:120px;
height:120px;
border-radius:60px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -60px;
margin-left: -60px;
}
#a5{
width:100px;
height:100px;
border-radius:50px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -50px;
margin-left: -50px;
}
#a6{
width:80px;
height:80px;
border-radius:40px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -40px;
margin-left: -40px;
}
#a7{
width:60px;
height:60px;
border-radius:30px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -30px;
margin-left: -30px;
}
#a8{
width:40px;
height:40px;
border-radius:20px;
display: block;
vertical-align: middle;
position: relative;
position: absolute;
left: 50%;
top: 50%;
margin-top: -20px;
margin-left: -20px;
}
@-webkit-keyframes a1 {
50% {
background: #ef7901;
}
}@-moz-keyframes a1 {
50% {
background: #ef7901;
}
}#a1 {
-webkit-animation: a1 2.6s 1s ease infinite;
-moz-animation: a1 2.6s 1s ease infinite;
}
@-webkit-keyframes a2 {
50% {
background: #d54421;
}
}@-moz-keyframes a2 {
50% {
background: #d54421;
}
}#a2 {
-webkit-animation: a2 2.4s 1.2s ease infinite;
-moz-animation: a2 2.4s 1.2s ease infinite;
}
@-webkit-keyframes a3 {
50% {
background: #98bf0d;
}
}@-moz-keyframes a3 {
50% {
background: #98bf0d;
}
}#a3 {
-webkit-animation: a3 2.6s 1.4s ease infinite;
-moz-animation: a3 2.6s 1.4s ease infinite;
}
@-webkit-keyframes a4 {
50% {
background: #01b0ec;
}
}@-moz-keyframes a4 {
50% {
background: #01b0ec;
}
}#a4 {
-webkit-animation: a4 2.6s 1.6s ease infinite;
-moz-animation: a4 2.6s 1.6s ease infinite;
}
@-webkit-keyframes a5 {
50% {
background: #7449f1;
}
}@-moz-keyframes a5 {
50% {
background: #7449f1;
}
}#a5 {
-webkit-animation: a5 2.6s 1.8s ease infinite;
-moz-animation: a5 2.6s 1.8s ease infinite;
}
@-webkit-keyframes a6 {
50% {
background: #b147a3;
}
}@-moz-keyframes a6 {
50% {
background: #b147a3;
}
}#a6 {
-webkit-animation: a6 2.6s 2s ease infinite;
-moz-animation: a6 2.6s 2s ease infinite;
}
@-webkit-keyframes a7 {
50% {
background: #f6b402;
}
}@-moz-keyframes a7 {
50% {
background: #f6b402;
}
}#a7 {
-webkit-animation: a7 2.6s 2.2s ease infinite;
-moz-animation: a7 2.6s 2.2s ease infinite;
}
@-webkit-keyframes a8 {
50% {
background: #8d8d8d;
}
}@-moz-keyframes a8 {
50% {
background: #8d8d8d;
}
}#a8 {
-webkit-animation: a8 2.6s 2.4s ease infinite;
-moz-animation: a8 2.6s 2.4s ease infinite;
}
</style>
</head>
<body>
<div id="cara">
<div class="anime">
<div id="a1">
<div id="a2">
<div id="a3">
<div id="a4">
<div id="a5">
<div id="a6">
<div id="a7">
<div id="a8">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="anime2">
<div id="a1">
<div id="a2">
<div id="a3">
<div id="a4">
<div id="a5">
<div id="a6">
<div id="a7">
<div id="a8">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="boca">
<div id="bocamod">
</div>
</div>
</div>
<div id="tapar">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
<div id="div5"></div>
<div id="div6"></div>
</div>
</body>
</html>