Rotate
Controls an element's rotation around a fixed point on a 2D plane without deforming it.
Utility | Properties |
---|---|
Error: 429 |
This example showcases various rotate()
utilities:
- The t-r-15 rotate utility rotates an element by 15 degrees.
- The t-r-30 rotate utility rotates an element by 30 degrees.
- The t-r-60 rotate utility rotates an element by 60 degrees.
<div class="d-g g-16 gtc-1 sm:gtc-3"> <div class="my-4 p-r"> <img class="d-18 d-ib rad-1 t-r-15" src="https://picsum.photos/600?image=360" /> <img class="o-20 d-18 d-ib l-0 p-a rad-1" src="https://picsum.photos/600?image=360" /> </div> <div class="my-4 p-r"> <img class="d-18 d-ib rad-1 t-r-30" src="https://picsum.photos/600?image=360" /> <img class="o-20 d-18 d-ib l-0 p-a rad-1" src="https://picsum.photos/600?image=360" /> </div> <div class="my-4 p-r"> <img class="d-18 d-ib rad-1 t-r-60" src="https://picsum.photos/600?image=360" /> <img class="o-20 d-18 d-ib l-0 p-a rad-1" src="https://picsum.photos/600?image=360" /> </div></div>
Conditional styles
Learn how to override existing utilities based on the userโs screen size or other factors, such as hover states.
Media modifier
You can combine responsive breakpoints like sm:-*
,md:-*
, lg:-*
, and xxl:-*
allows targeting specific utilities in different viewports.
<div class="t-r-0 md:t-r-5 ..."></div>
Hover modifier
Alternatively, you can apply :hover
by using h:-*
utility to override elements and change their values when hovering over them.
<div class="t-r-0 h:t-r-5 ..."></div>