devric devric - 1 year ago 66
CSS Question

css rotate a pseudo :after or :before content:""

anyway to make a rotation work on the pseudo


I'm trying to rotate a unicode symbol.

Answer Source

Inline elements can't be transformed, and pseudo elements are inline by default, so you must apply display: block or display: inline-block to transform them:

​#whatever:after {
  display: inline-block;
  -webkit-transform: rotate(30deg);
  -moz-transform: rotate(30deg);
  -o-transform: rotate(30deg);
  -ms-transform: rotate(30deg);
  transform: rotate(30deg);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download