Rotates an element based on a given degree.
Class | Properties |
---|---|
rotate-90 | transform: rotate(90deg); |
-rotate-90 | transform: rotate(-90deg); |
rotate-180 | transform: rotate(180deg); |
-rotate-180 | transform: rotate(-180deg); |
<div class="flex flex-wrap align-items-center justify-content-center md:justify-content-between">
<div class="h-6rem w-6rem m-5">
<img src="/images/rotate-placeholder-blue.svg" class="rotate-90 h-6rem w-6rem" alt="primeflex">
</div>
<div class="h-6rem w-6rem m-5">
<img src="/images/rotate-placeholder-blue.svg" class="-rotate-90 h-6rem w-6rem" alt="primeflex">
</div>
<div class="h-6rem w-6rem m-5">
<img src="/images/rotate-placeholder-blue.svg" class="rotate-180 h-6rem w-6rem" alt="primeflex">
</div>
<div class="h-6rem w-6rem m-5">
<img src="/images/rotate-placeholder-blue.svg" class="-rotate-180 h-6rem w-6rem" alt="primeflex">
</div>
</div>
Responsive alternatives are available for customizations based on screen size. Add the responsive breakpoint keyword followed by a semi-colon as a prefix such as md:rotate-90 to use a responsive class.
Class | Description |
---|---|
sm: | small screens e.g. phones |
md: | medium screens e.g. tablets |
lg: | large screens e.g. notebooks |
xl: | larger screens e.g monitors |
<div class="flex align-items-center justify-content-center">
<div class="h-6rem w-6rem">
<img src="/images/rotate-placeholder-yellow.svg" class="rotate-90 md:-rotate-90 h-6rem w-6rem" alt="primeflex">
</div>
</div>