Conociendo CSS3 - Animaciones – Hipotecario

Hola, queridos lectores. Desdehoy comenzaré a mostrar todo el poder de CSS3, pero antes de comenzar les pido mil disculpas por haberme ausentado unosdías, ya que en mi universidad rendí misúltimosexámenes, pero bueno vamos al grano, lo que a ustedes les interesa.

css3 animaciones, davisdrumkey, css3 keyframes


Con CSS3 podemos hacer muchas cosas, como lo son las transiciones, animaciones, efectos de textos,transformaciones2D, 3D, etc. Para empezar lesdemostrare una animación que realisé para ustedes.



En este demo he animado únicamente imágenes, y para crear estas animaciones debemos conocer la regla llamada @keyframes, la cual es muy sencilla, por ejemplo de esta manera he animado el sol.

#sol {
width: 100px;
height: 100px;
position: fixed;
top: 60px;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbSHjWopCqs3bViR459waUUXrM2_XboBfwWzDyF6XNMxSYJtJd9vmryxiLjE-8IQ03A_KZqWKHfFQY4aAnT-fYdf22LSeL38jXSAqOAdJp6dGzNBGWvLF7eBeL7Ak_FJX1Np3yI5q9Plso/s100/sol.png);
animation: sol 5s;
-webkit-animation: sol 5s;
-o-animation: sol 5s;
-moz-animation: sol 5s;
z-index: 10;
margin-left: -139px;
}

@keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
@-webkit-keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
@-o-keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
@-moz-keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}

Les explico el código:

  1. Como primer punto le he dado valoresbásicospara su diseño, como un width, height, background, etc.
  2. Uno de los puntos claves es "animation: sol 5s;" Simplemente le daremos un nombre a nuestra animación y la duración de ella, en este caso es de 5 Segundos.
  3. El siguiente punto clave es "@keyframes sol" Lo que estamos haciendoacáes asociar el @keyframes a laanimaciónllamada "sol" que generamos anteriormente.
  4. Y dentro de "@keyframes sol" hemos agregado la forma en que se animara nuestro "@keyframes" llamado "sol". En que cuando este a 0%estaráubicado desde arriba hacia abajo unos 500px; "top: 500px;" de esta maneraacercándosea 100% laanimaciónira disminullendo los pixeles de distancia desde arriba hacia abajo llegando a los 60px "top: 60px;"

Tambiénpodemos crear animaciones repitiéndose infinitamente. Como es el caso de las nubes y losaviones, un caso en partícular es el del avión azul.

#avion1 {
width: 250px;
height: 100px;
position: fixed;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc5Jo6oRTP-WJ1TiW2w9gkAXW0APlk4QxsPX3dEon3ufNYaiD-Dt0T8Me5sWvQJg6GrWfrZj7WtSNlUAEvOj_Y3wNzJ2R5j2L1OUjfDKafKLK3n5WWSQ6s7_W5Cjzr40W8ZmgIkrWfl_Tm/s250/Avion1.png);
animation: avion1 20s infinite;
-o-animation: avion1 20s infinite;
-moz-animation: avion1 20s infinite;
-webkit-animation: avion1 20s infinite;
}
@-webkit-keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
@keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
@-moz-keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
@-o-keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}

Solo agregando en el nombre de la animación la opción "infinite" quedando en este caso de esta manera "animation: avion1 20s infinite;".

A continuación jugaremos con algo simple para poder comprender con sencillos ejemplos:

#simple1
{
width:100px;
height:100px;
margin: auto;
background:red;
animation: simple1 5s infinite;
-moz-animation: simple1 5s infinite;
-webkit-animation: simple1 5s infinite;
-o-animation: simple1 5s;
}

@keyframes simple1
{
from {background:red;}
to {background:yellow;}
}

@-moz-keyframes simple1
{
from {background:red;}
to {background:yellow;}
}

@-webkit-keyframes simple1
{
from {background:red;}
to {background:yellow;}
}

@-o-keyframes simple1
{
from {background:red;}
to {background:yellow;}
}



#simple2
{
width:100px;
height:100px;
margin: auto;
background:red;
animation:simple2 2s infinite;
-moz-animation:simple2 2s infinite;
-webkit-animation:simple2 2s infinite;
-o-animation:simple2 2s infinite;
}

@keyframes simple2
{
0% {background:red;}
25% {background:yellow;}
50% {background:blue;}
100% {background:green;}
}

@-moz-keyframes simple2
{
0% {background:red;}
25% {background:yellow;}
50% {background:blue;}
100% {background:green;}
}

@-webkit-keyframes simple2
{
0% {background:red;}
25% {background:yellow;}
50% {background:blue;}
100% {background:green;}
}

@-o-keyframes simple2
{
0% {background:red;}
25% {background:yellow;}
50% {background:blue;}
100% {background:green;}
}


#simple3
{
width: 100px;
height: 100px;
position: relative;
background: red;
border-radius: 50%;
animation:simple3 10s infinite linear;
-moz-animation:simple3 10s infinite linear;
-webkit-animation:simple3 10s infinite linear;
-o-animation:simple3 10s infinite linear;
}

@keyframes simple3
{
0% {left: 0%;top: 0%;}
50% {left: 50%;top: 50%;}
100% {left: 100%;top: 0%;}
}


@-moz-keyframes simple3
{
0% {left: 0%;top: 0%;}
50% {left: 50%;top: 50%;}
100% {left: 100%;top: 0%;}
}

@-webkit-keyframes simple3
{
0% {left: 0%;top: 0%;}
50% {left: 50%;top: 50%;}
100% {left: 100%;top: 0%;}
}

@-o-keyframes simple3
{
0% {left: 0%;top: 0%;}
50% {left: 50%;top: 50%;}
100% {left: 100%;top: 0%;}
}


También les comparto el código completo de la animación.


#sol {
width: 100px;
height: 100px;
position: fixed;
top: 60px;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbSHjWopCqs3bViR459waUUXrM2_XboBfwWzDyF6XNMxSYJtJd9vmryxiLjE-8IQ03A_KZqWKHfFQY4aAnT-fYdf22LSeL38jXSAqOAdJp6dGzNBGWvLF7eBeL7Ak_FJX1Np3yI5q9Plso/s100/sol.png);
animation: sol 5s;
-webkit-animation: sol 5s;
-o-animation: sol 5s;
-moz-animation: sol 5s;
z-index: 10;
margin-left: -139px;
}

@keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
@-webkit-keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
@-o-keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
@-moz-keyframes sol
{
0% {top:500px;}
100% {top:60px;}
}
#nube1 {
width: 100px;
height: 100px;
top: 86px;
position: fixed;
z-index: 11;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcZwzFM8dUXxbyJJfKmkxGykebhm6kyxNqp9NVRgFZMpXYcmvvH7RLCosq8H0ILbvWHKv4X5MhURnQ3B3L4rYABGQIiNxMLWf5zQonmVeCJSN6iisO_VGhBL38-xGvwKzqnxMVHTafl55N/s100/nube1.png);
animation: nube1 35s infinite;
-webkit-animation: nube1 35s infinite;
-o-animation: nube1 35s infinite;
-moz-animation: nube1 35s infinite;
}
@-webkit-keyframes nube1
{
0% {left:-10%;}
100% {left:105%;}
}
@keyframes nube1
{
0% {left:-10%;}
100% {left:105%;}
}
@-o-keyframes nube1
{
0% {left:-10%;}
100% {left:105%;}
}
@-moz-keyframes nube1
{
0% {left:-10%;}
100% {left:105%;}
}
#nube2 {
width: 100px;
height: 100px;
top: 120px;
position: fixed;
z-index: 11;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheMsLfUDdfMUoinQ17lq4s7-bWygZWu79BWKZr_kNpJcUOR3rLQLJBiOaw65QyntUWp65U83ayO4MX8tCqmBazY-f4kLxs8orkN6VIQk0A_VcCa6TndfigL0u8SJRcME7bcCOukm3ONv5D/s100/nube3.png);
animation: nube2 80s infinite;
-webkit-animation: nube2 80s infinite;
-o-animation: nube2 80s infinite;
-moz-animation: nube2 80s infinite;
}
@-webkit-keyframes nube2
{
0% {left:-10%;}
100% {left:105%;}
}
@keyframes nube2
{
0% {left:-10%;}
100% {left:105%;}
}
@-o-keyframes nube2
{
0% {left:-10%;}
100% {left:105%;}
}
@-moz-keyframes nube2
{
0% {left:-10%;}
100% {left:105%;}
}
#nube3 {
width: 100px;
height: 100px;
top: 50px;
position: fixed;
z-index: 11;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0yieTh0sJvrMSCVhfOWnfdQL82c8Cg8JgghT4Ck2MnLXZwR7QmyPatNZ1eN7tewiT3UqTSVddkr5AZl_y8cvrgnTEXXk4ytEWFlECJ37EXnISrqBnZGu3LRQbkSlYwUykGR6e301bgbRT/s100/nube4.png);
animation: nube3 150s infinite;
-o-animation: nube3 150s infinite;
-moz-animation: nube3 150s infinite;
-webkit-animation: nube3 150s infinite;
}
@-webkit-keyframes nube3
{
0% {right:-10%;}
100% {right:105%;}
}
@keyframes nube3
{
0% {right:-10%;}
100% {right:105%;}
}
@-o-keyframes nube3
{
0% {right:-10%;}
100% {right:105%;}
}
@-moz-keyframes nube3
{
0% {right:-10%;}
100% {right:105%;}
}
#nube4 {
width: 100px;
height: 100px;
top: 200px;
position: fixed;
z-index: 11;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0yieTh0sJvrMSCVhfOWnfdQL82c8Cg8JgghT4Ck2MnLXZwR7QmyPatNZ1eN7tewiT3UqTSVddkr5AZl_y8cvrgnTEXXk4ytEWFlECJ37EXnISrqBnZGu3LRQbkSlYwUykGR6e301bgbRT/s100/nube4.png);
animation: nube4 200s infinite;
-o-animation: nube4 200s infinite;
-moz-animation: nube4 200s infinite;
-webkit-animation: nube4 200s infinite;
}
@-webkit-keyframes nube4
{
0% {left:-10%;}
100% {left:105%;}
}
@keyframes nube4
{
0% {left:-10%;}
100% {left:105%;}
}
-o-@keyframes nube4
{
0% {left:-10%;}
100% {left:105%;}
}
-moz-@keyframes nube4
{
0% {left:-10%;}
100% {left:105%;}
}
#avion1 {
width: 250px;
height: 100px;
position: fixed;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc5Jo6oRTP-WJ1TiW2w9gkAXW0APlk4QxsPX3dEon3ufNYaiD-Dt0T8Me5sWvQJg6GrWfrZj7WtSNlUAEvOj_Y3wNzJ2R5j2L1OUjfDKafKLK3n5WWSQ6s7_W5Cjzr40W8ZmgIkrWfl_Tm/s250/Avion1.png);
animation: avion1 20s infinite;
-o-animation: avion1 20s infinite;
-moz-animation: avion1 20s infinite;
-webkit-animation: avion1 20s infinite;
}
@-webkit-keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
@keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
@-moz-keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
@-o-keyframes avion1
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}
#avion2 {
width: 250px;
height: 100px;
position: fixed;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0IGUTvp8x8UXK8nhTpil8uLU3xxQXV3xSE_OdWe90EZT3bOfXhbt57q6CHVi8vJEbJVHDUEHoa7lghkdF33_4AAgSNObsdO8t3PMWd4lyd6_4t6zdX5iGElzOAbcov9S3GERsfNGql8cH/s250/Avion2.png);
animation: avion2 10s infinite;
-o-animation: avion2 10s infinite;
-moz-animation: avion2 10s infinite;
-webkit-animation: avion2 10s infinite;
}
@-webkit-keyframes avion2
{
0% {right:-20%;bottom:0px;}
100% {right:105%;bottom:500px;}
}
@keyframes avion2
{
0% {right:-20%;bottom:0px;}
100% {right:105%;bottom:500px;}
}
@-moz-keyframes avion2
{
0% {right:-20%;bottom:0px;}
100% {right:105%;bottom:500px;}
}
@-o-keyframes avion2
{
0% {left:-20%;bottom:0px;}
100% {left:105%;bottom:500px;}
}


Bueno espero que le sirva como conocimiento para sus web y seguiremos viendo mas cosas sobre CSS3, así que prepárense. Saludos malignos, un gran abrazo.


MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private JetMundial Football Mesothelioma law firm,mega life and health FIFA World Cup es un buen servicio en las distintas naciones trans union pero resulto que tenia cancer y fui a asbestos cancer y me dijeron en asbestos mesothelioma que tambien padecia de prostate cancer treatment y un daño tremendo a mi organismo fui a malignant pleural mesothelioma,asi que hice un prestamo en credit repair y otro en chase credit pero de pronto un anti spam software asi que decido un auto en rental car in costa rica me registre en Facebook en internet domain registration y tambien obtuve un domain registration,Selling annuity payments for cash,Selling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDNos ofrece Mundial Football eloan com, FIFA World Cupuna gran variedad para contratar mesothelioma info y obtener un equity line of credit y una buena estructura de negocio SEO consolidate loans y visitar su casa matriz Mesothelioma law firm,home equity loans domain name searchSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Social media management illinois mesothelioma lawyer compare life assurance Car Insurance in South Dakota Seo services yahoo web hosting Php programmers car accident lawyers los angeles DONATE YOUR CAR FOR MONEY what is structured settlement Make money online Australia Hire php programmers personal injury law firm Car insurance quotes MN Car Donate Best Seo company Online College Course home phone internet bundle Online casino Donate Cars Illinois Best social media platforms for business donate old cars to charity Motor Replacements Casino best consolidation loan student Royalty Free Images Stock phd in counseling education Massage School Dallas Texas Mobile casino dui lawyer scottsdale Criminal lawyer Asbestos Lawyers mesothelioma lawyer texas Bankruptcy lawyer donate car for tax credit Sell Annuity Payment car insurance quotes colorado Met Auto auto accident attorney Torrance Psd to html Home phone internet bundle georgia truck accident lawyer Social media examiner mesotheliama Business management software Low credit line credit cards MASSAGE SCHOOL DALLAS TEXAS Life Insurance Co Lincoln CAR INSURANCE QUOTES COLORADO personal injury attorney ocala fl asbestos exposure lawyers Home Phone Internet Bundle Adobe illustrator classes Personal Injury Lawyers Nunavut culture purchase structured settlements personal injury accident lawyer Donate cars Illinois Donate your Car for Money adverse credit remortgage See more at http//wwwginfostopnet/ Online Classes arizona auto accident attorney Html email Donate Old Cars to Charity Personal Injury Law Firm Psd to WordPress Live casino Donate Car to Charity California insurance medical temporary DONATE A CAR IN MARYLAND google affiliate Casino reviews car insurance companies motorcycle lawyer los angeles DALLAS MESOTHELIOMA ATTORNEYS DUI lawyer Hire php developers mesothelioma lawyers san diego Custom Christmas cards Online Criminal Justice Degree HOW TO DONATE A CAR IN CALIFORNIA structured settlement purchasers DONATE OLD CARS TO CHARITY Dwi lawyer mesothelioma suit Seo company domain registration yahoo Service business software Tech school MORTGAGE ADVISER Criminal defense lawyer Php programmers for hire Hire php developer Dayton Freight Lines domain name yahoo selling annuity Computer science classes online federal criminal defense attorney colorado mesothelioma lawyers Seo companies Donating a car in Maryland CRIMINAL DEFENSE ATTORNEYS FLORIDA Custom WordPress theme designer DONATE CARS IN MA Nunavut Culture washington mesothelioma attorney New social media platforms mesothelioma lawyer dallas Motor replacements state of california car insurance Business finance group ashely madis world trade center footage Social media platforms for business

Share: