Pratham Profile picture
I talk about web and social β€’ DevRel @APILayer β€’ Building https://t.co/niju9j3UA2 & https://t.co/TxBXHrPKDu β€’ Prev @Rapid_API @HyperspaceAI

Jun 22, 2021, 28 tweets

Are you planning to create your first CSS art for fun? Start with the basic shapes.

Here are 26 easy to hard shapes and figures you can try first πŸ§΅πŸ‘‡πŸ»

In general, analyze any image and try to think how can you make it using different shapes.

Two concepts that you need to master

1. border-radius
2. linear-gradient

1. Circle Yellow πŸ”΅

- 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 First πŸŒ“

- Create a rectangle
- Apply border-radius top left and top right same as the 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 a 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 a hexagon is very easy
- We need to make two trapeziums of the same size but make sure that the 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 vertically and horizontally
- Rotate 45deg

10. Egg πŸ₯š

- Using an advanced border-radius technique

11. Star Glowing 🌟

- Create two triangle upside down
- Align the second triangle in the middle of the first one

12. Moon πŸŒ™

- Transparent background
- Apply box-shadow

13. Coffee β˜•

14. Heart ❀️

- Two rectangles with top round border-radius

15. Infinity ♾️

It may look tough but trust me I created this symbol using border-radius only

16. Arrow ▢️

Combination of the rectangle and a triangle

17. Star ⭐

Combination of two triangles

18. Magnifying glass πŸ”

You guessed it right! It's just a simple circle and small rectangle

19. Pacman

20. 8 Point 🌟

Two squares overlapping each other

21. Pentagon βœ’

- Create a trapezium
- Create a triangle
- Merge them both

22. Leaf πŸ€

- Just the matter or border-radius

23. Yin and Yang

Looks tough but actually, it is not

24. Mobile Phone πŸ“±

25. Headphones 🎧

26. Spectacles πŸ‘“

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling