Monday 3 December 2018

ROBOT 2.O title with html ,CSS by. code for aninate


Animation with html and css coding.


This animation can be used for creating site title, special or important headlines to highlight from other.

R
O
B
O
T
2
.
O

L
i
k
e
A
n
d
S
h
a
r
e

What you need for creating animation like above.



  • Basic knowledge of html and css.
  • Text editor like notepad , better if you use Standard code editor.

Recent animation posts
1. A animation with html tag used for creating a line and circle
2. New edition of Animation with html and css (line, animate and and css property) - code4animate.blogspot
3. Animation with html and css (line, animate and and css property) - code4animate.blogspot


Lets start coding to create animation like this one.

Step first:- Open an text editor and write the basic structure of html5 and start coding as in below steps.

Step second :- Now create div element with different id name and same class name.
Place all this div element in an div with unique id or class name.One div for one letter.Example &ltdiv&gta&lt/div&gt). As in below code

&ltdiv id="store_div"&gt
&ltdiv id="sp1" class="spn"&gtC&lt/div&gt
&ltdiv id="sp2" class="spn"&gto&lt/div&gt
&ltdiv id="sp3" class="spn"&gtd&lt/div&gt
&ltdiv id="sp4" class="spn"&gte&lt/div&gt
&ltdiv id="sp5" class="spn"&gt4&lt/div&gt
&ltdiv id="sp6" class="spn"&gtA&lt/div&gt
&ltdiv id="sp7" class="spn"&gtn&lt/div&gt
&ltdiv id="sp8" class="spn"&gti&lt/div&gt
&ltdiv id="sp9" class="spn"&gtm&lt/div&gt
&ltdiv id="sp10" class="spn"&gta&lt/div&gt
&ltdiv id="sp11" class="spn"&gtt&lt/div&gt
&lt/div&gt

Step third :-After create div elements , define css for div elements appearance. As in below code
Change selectors value to customize yourself.

#store_div{
height:400px;
width:600px;
position:relative;
overflow:hidden;
}
.spn{
font-size:70px;
font-weight:700;
font-family:aerial;
margin-top:150px;
color:blue;
margin-left:7px;
display:inline-block;
animation: spn_anim 5.5s 100;
}

Step fourth: - Now define css for changing the color of letters and don't forget to code to make delay in animation for each letter otherwise all letters change color at same time, as in below code

@keyframes spn_anim {
10%{color:blue;}
30%{color:red;}
50%{color:green;}
70%{color:orange;}
100%{color:blue;}
}
#sp1{animation-delay:0s;}
#sp2 {animation-delay:0.5s;}
#sp3 {animation-delay:1s;}
#sp4 {animation-delay:1.5s;}
#sp5{animation-delay:2s;}
#sp6{animation-delay:2.5s;}
#sp7 {animation-delay:3s;}
#sp8 {animation-delay:3.5s;}
#sp9 {animation-delay:4s;}
#sp10 {animation-delay:4.5s;}
#sp11 {animation-delay:5s;}
#sp12 {animation-delay:5.5s;}

Step fifth :- Now combine and save this codes in a single html file with .html extension. and Run it on browser.

No comments:

Post a Comment