4 ms·
> The scary thing here is that if I can't build these stuffs then there is 0 point of me learning css. You can build literally anything with CSS. It’s a very p
by M4v3R 4y ago
> The scary thing here is that if I can't build these stuffs then there is 0 point of me learning css.
You can build literally anything with CSS. It’s a very powerful language. To learn how to do it the only way really is to get your hands wet and try stuff. Inspect pages made by other people. Read through some courses.
To build the component you linked and basically any other component what you need to do is to look at it and visually decompose it to a bunch of primitives that you know how to do. In your example - you probably know how to place the text and icons on the right. The timeline on the left is basically a straight line (which can be drawn with a border property) and some circles on top of it (background color + border radius: 50% gives you a circle, add a border color and you have exactly what you want). Then all you’re left with is laying all these elements down, in this case I would use CSS Grid to align the dots with the text on the right properly, and relative positioning to align the colored circles in the correct place on the line.
- indymike 4y ago> You can build literally anything with CSS. It’s a very powerful language. To learn how to do it the only way really is to get your hands wet and try stuff. CSS is good at what it does, but it is difficult to master. I can see where someone learning would really struggle because a lot of the techniques required to implement components aren't exactly intuitive. A lot of the advice people give reads like, OK, first, put the sandwich in the plastic bag, then assemble the fusion reactor and set it next to the refrigerator - here's a handy youtube video showing how I did it in 5 minutes! It's easy! > Inspect pages made by other people. Read through some courses. You are telling someone who clearly is doing exactly this to... do this.