Learn CSS animation in 8 minutes 🎞️

preview_player
Показать описание
CSS animation tutorial example explained

#CSS #animation #tutorial

#box1{
width: 250px;
height: 250px;
background: red;
font-size: 225px;
text-align: center;
/*
animation: mySlide;
animation-play-state: running;
animation-iteration-count: infinite;
animation-delay: 0s;
animation-timing-function: linear;
animation-duration: 5s;
*/
animation: 3s linear 0s infinite running mySlide;

}
#box1:hover{

}
#box1:active{

}

@keyframes mySlide{
from{margin-left: 100%;}
to{margin-left: 0%;}
}

@keyframes myRotate{
/*100%{transform: rotateX(360deg)}*/
/*100%{transform: rotateY(360deg)}*/
100%{transform: rotateZ(360deg)}
}

@keyframes myOpacity{
50%{opacity: 0;}
}

@keyframes myScale{
50%{transform: scale(0.5, 0.5);}
}

@keyframes myColorChange{
0%{background-color: red;}
20%{background-color: orange;}
40%{background-color: yellow;}
60%{background-color: green;}
80%{background-color: blue;}
100%{background-color: purple;}
}
Рекомендации по теме
Комментарии
Автор

/* style.css */

#box1{
width: 250px;
height: 250px;
background: red;
font-size: 225px;
text-align: center;
/*
animation: mySlide;
animation-play-state: running;
animation-iteration-count: infinite;
animation-delay: 0s;
animation-timing-function: linear;
animation-duration: 5s;
*/
animation: 3s linear 0s infinite running mySlide;

}
#box1:hover{

}
#box1:active{

}

@keyframes mySlide{
from{margin-left: 100%;}
to{margin-left: 0%;}
}

@keyframes myRotate{
/*100%{transform: rotateX(360deg)}*/
/*100%{transform: rotateY(360deg)}*/
100%{transform: rotateZ(360deg)}
}

@keyframes myOpacity{
50%{opacity: 0;}
}

@keyframes myScale{
50%{transform: scale(0.5, 0.5);}
}

@keyframes myColorChange{
0%{background-color: red;}
20%{background-color: orange;}
40%{background-color: yellow;}
60%{background-color: green;}
80%{background-color: blue;}
100%{background-color: purple;}
}

<!DOCTYPE html>

<html>
<head>
<title>My first website</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<div id="box1">Hi</div>

</body>
</html>

BroCodez
Автор

Finished your comlete HTML & CSS tutorials, now going for JS :)

Your Java tutorials & DSA are fire too !

Remolhunter
Автор

The way you explain always inspires me to learn more. Love you Bro💚

ArpitKumarSuman
Автор

Thank you for all I just finished this two playlist : html and css tutorial it’s very good.

nothing.ghost
Автор

A BIG W FOR BRO
TYSM BRO because of you I have completed HTML and CSS.
now I am going to practice both of them by building some basic projects and then i will move on to JS

NarutoUzumakiDatebayo
Автор

Happy Teacher's Day bro ♥️ from India

aer
Автор

Wouhou, just finish HTML and CSS videos, feel like a superhero. Live long Bro. Bro army let's get it. Now time to do some javascript heyheyhey

MeuTube
Автор

THIS IS THE LAST TUTORIAL LEFT NOW!!!🔥🔥

NarutoUzumakiDatebayo
Автор

love you man! your videos are life-saving)

lamour
Автор

Hey bro!
I want more out of css.
Please create some more videos.

HassanRaza-nnro
Автор

bro, bro broski, broskido - REALLY real bro

purpleacecard
Автор

I think you are the best at explaining code lol

uckyvn
Автор

hey bro can u pls bring to this playlist grid and flexbox? I really like how u teach!!

lilperkz
Автор

Bro, are you fine with facecam videos? Could you do one if you don't mind?

aditya_asundi
Автор

Love your videos bro, keep it up! Also get on discord

cayden
Автор

i really didnt know that how to use CSS transition on click, I thought without javascript I cant do anything

AtikWithBuckTeeth
Автор

already watch this on Html and css full course

hikkiyt
Автор

can someone help me @keyframes is not working on notepad++ does anyone know what to do. Am I missing a plugin or something "Please Help" thanks

ianjohansson
Автор

can the animations work for an image which you position?

Haileyleah