Object Position
Controls how to position the container's content.
| Class | Style |
|---|---|
op-b | object-position: bottom |
op-c | object-position: center |
op-l | object-position: left |
op-lb | object-position: left bottom |
op-lt | object-position: left top |
op-r | object-position: right |
op-rb | object-position: right bottom |
op-rt | object-position: right top |
op-t | object-position: top |
This example showcases various object-position utilities:
- The bottom object position utility aligns the object to the bottom edge of the container.
- The center object position utility centers the object within the container.
- The left object position utility aligns the object to the left edge of the container.
- The right object position utility aligns the object to the right edge of the container.
- The top object position utility aligns the object to the top edge of the container.
<div class="d-g g-1 gtc-3"> <img class="d-24 of-none op-lt rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-t rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-rt rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-l rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-c rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-r rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-lb rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-b rad-1" src="/img/lighthouse.jpg" /> <img class="d-24 of-none op-rb rad-1" src="/img/lighthouse.jpg" /></div>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Using media queries
You can combine responsive breakpoints like sm:op-*, md:op-*, lg:op-*, and xxl:op-* to allow targeting specific utilities in different viewports.
Using hover states
Alternatively, you can apply :hover by using h:op-* utility to override elements and change their values when hovering over them.