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

CssRotationPseudo Element

Css Problem Overview


anyway to make a rotation work on the pseudo

content:"\24B6"? 

I'm trying to rotate a unicode symbol.

Css Solutions


Solution 1 - Css

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 {
  content: "\24B6";
  display: inline-block;
  transform: rotate(30deg);
}

<div id="whatever">Some text </div>

Solution 2 - Css

.process-list:after{
    content: "\2191";
    position: absolute;
    top:50%;
    right:-8px;
    background-color: #ea1f41;
    width:35px;
    height: 35px;
    border:2px solid #ffffff;
    border-radius: 5px;
    color: #ffffff;
    z-index: 10000;
    -webkit-transform: rotate(50deg) translateY(-50%);
    -moz-transform: rotate(50deg) translateY(-50%);
    -ms-transform: rotate(50deg) translateY(-50%);
    -o-transform: rotate(50deg) translateY(-50%);
    transform: rotate(50deg) translateY(-50%);
}

you can check this code . i hope you will easily understand.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondevricView Question on Stackoverflow
Solution 1 - CssmethodofactionView Answer on Stackoverflow
Solution 2 - CsssaddamwpView Answer on Stackoverflow