How to rotate pseudo element css
问题 I want to recreate this icon using css pseudo elements (as a toggle indicator): I have created the nececcary pseudo elements using ::after, ::before and tried to rotate them using transform: rotate(90deg) . How can I tell them to rotate around their own center? I have tried transform-origin: 50% 50%; which does not work. Right now, both pseudo elements got the same right: 10px; but they are not placed above each other, instead they are next to each other. You can check this JS FIDDLE to