25 Tweets 14 reads Apr 20, 2021
Let's create 22 shapes and figures using pure CSS ๐ŸŽจ
๐Ÿงต๐Ÿ‘‡๐Ÿป
1. Circle ๐ŸŸก
- Pretty simple, we just need to make a square and apply the border-radius 50% in order to give it a circular shape
2. Semi-circle ๐ŸŒ“
- Create a rectangle
- Apply border radius top left and top right same as height of the rectangle
3. Triangle ๐Ÿ”บ
- Creating a triangle is little bit tricky
- Set height and width as zero
- To make this, we draw a solid border and make the side border transparent
4. Trapezium ๐Ÿ“
- Same as triangle but in this case we need to set some width
5. Parallelogram ๐Ÿ”ณ
- Create a rectangle
- Apply skew in order to tilt it
6. Hexagon ๐Ÿ’ 
- Creating hexagon is very easy
- We need to make two trapeziums of same size but make sure that other trapezium should be upside down
- Align them perfectly
7. Drop ๐Ÿ’ง
- Create a square
- Apply 50% border-radius to all the sides except one side
- Rotate in such a manner so that tip comes to top
8. Diamond ๐Ÿ’Ž
- Combination of Trapezium and triangle
9. Cross โŒ
- Create two rectangles
- Place them over each other vetically and horizontally
- Rotate 45deg
10. Egg ๐Ÿฅš
- Using advance border-radius technique
11. Star ๐ŸŒŸ
- Create two triangle upside down
- Align second triangle in the middle of the first one
12. Moon ๐ŸŒœ
- Transparent background
- Apply box shadow
13. Coffee โ˜•
14. Infinity Symbol โ™พ๏ธ
It may look tough but trust me I created this symbol using border-radius only
15. Arrow โžก๏ธ
Combination of rectangle and a triangle
16. Star โญ
Combination of two triangles
17. Magnifying glass ๐Ÿ”
You guessed it right! Its just a simple circle and small rectangle
18. Heart โค๏ธ
- Two rectangles with top round border-radius
19. Pacman
20. 8 Point Star ๐ŸŒŸ
Two squares overlapping each other
21. Pentagon โœ’
- Create a trapezium
- Create a triangle
- Merge them both
22. Leaf ๐Ÿ€
- Just the matter or border-radius
I hope you will find it helpful, if so, share it โค๏ธ
Peace out ๐Ÿ˜‰
In general, these shapes or CSS arts are of no use in practical terms, but
- It can increase your CSS learning process up to 10 times ๐Ÿš€
- Helps you build better understanding ๐Ÿคฏ

Loading suggestions...