Pseudo-element

&::after / &::before

nana 🧙🏻‍♀️
Design & Code Repository

--

When we use Pseudo-element ::before and ::after,

we should inputcontent CSS property and position:realative/absolute property.

content: ‘’;

Pseudo-element hasn’t any space. There is nothing. So we need to make a space using content property like below:

position: relative;

Property ::before and ::after has absolute position basically. So They need a relative position in parent area.

--

--