Using FontAwesome 5 for Rotations:
In the past, standard declarations only included .fa-rotate-90
, .fa-rotate-180
, and .fa-rotate-270
. However, you now have the option to create your own rotation classes:
.fa-rotate-45 {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
Presently with FontAwesome 5:
You can utilize what is known as "Power Transforms". For example:
<i class="fas fa-snowman" data-fa-transform="rotate-90"></i>
<i class="fas fa-snowman" data-fa-transform="rotate-180"></i>
<i class="fas fa-snowman" data-fa-transform="rotate-270"></i>
<i class="fas fa-snowman" data-fa-transform="rotate-30"></i>
<i class="fas fa-snowman" data-fa-transform="rotate--30"></i>
To apply these rotations, add the data-fa-transform
attribute with the value of rotate-
followed by your desired degree of rotation.
Reference: https://fontawesome.com/how-to-use/on-the-web/styling/power-transforms