Pi Day Animation Using Css

by bldrkamal in Circuits > Software

833 Views, 0 Favorites, 0 Comments

Pi Day Animation Using Css

Screenshot (22).png
simple css animation

Introduction: As Pi day is around the corner, I decided to to write a simple program that will create simple animation of pi using the knowledge of CSS and HTML.

Supplies

1. personal computer

2. notepad ++ or any text editor of your choice

3. Figma software for SVG design and editing

Design Your Pi Symbol

Screenshot (20).png

I use Figma software to design the pi symbol and export it as an SVG file. you can download Figma software online and it is free to use

Downloads

Create a Simple Html Template

Screenshot (28).png

create an HTML template, open the pi SVG file using notepad++ or any text editor, copy the SVG code and paste it inside the body element of your HTML template.

Create the '14th of March Is Pi Day' Letters.

Screenshot (29).png

Inside the body element of my HTML template, I inserted the h1 element and wrote the '14th of March is pi day' using the span element embedded in my h1 element

Animation of Pi Symbol

Screenshot (34).png
Screenshot (38).png

For the pi symbol, I used the CSS @ keyframe rules creating a kind of pulsing effect changing the scale of the pi symbol at a time interval of 1.5s.

Animation of the '14th March Is Pi Day' Letter

Screenshot (36).png
Screenshot (40).png

I used the WebKit CSS extension to create the letter animation

Finishing the Animation

Screenshot (22).png

finally, it was finished and we have jumping letters and a pulsing pi. Happy pi day in advance to you all.

Code is available down below. Just convert it from pie.txt to pie.html and run it in your browser to see the animation.

Downloads