0
Use of ::Before and ::After
What are some use cases for The pseudo elements Before and After? One might think you could creat custom bullet points for lists, but what else?
2 ответов
0
As far I have seen it, before and after classes are mostly used to do rather complex styling like e.g. a arrow-shaped border at the bottom. They are generally used to reduce the amount of html tags, by using before and after like additional html elements. On regular websites however you will probably find them seldom...
+ 1
Like aaron said, its great for creating additional styling without having the additional html.
Since you can have the content attribute, you can also add icons with before and after without actually having icons clutter your html.
You can even transition before and after elements and by doing that you can create some pretty complex design from just a single element.