I'm not able to &::before, &::after property to insert pseudo elements

I'm not able to &::before, &::after property to insert pseudo elements
Posted Jan 10,2021 by Manisha Dubey

1 Answer     113 Views    

&::before, &::after property isn't working when I want to insert pseudo elements in html page


Elevenstech Jan 11, 2021

You should use ::before and ::after selectors with content property:

.selector::after {
    content: ""; // ::before and ::after both require content
    background-color: white;
}