Pseudo-selectors in styled-components
work just like they do in CSS. (or rather, Sass) Whatever isn't working is likely a problem in your specific code, but that's hard to debug without seeing the actual code!
Here is an example of how to use a simple :after
:
const UnicornAfter = styled.div`
&:after {
content: " ??";
}
`;
<UnicornAfter>I am a</UnicornAfter> // renders: "I am a ??"
If you post your code I'll likely be able to help debug your specific issue!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…