Object Position
Controls how to position the container's content.
Utility | Properties |
---|---|
Error: 429 |
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="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-t rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-rt rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-l rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-c rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-r rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-lb rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-b rad-1" src="https://picsum.photos/300?image=870" /> <img class="d-24 of-none op-rb rad-1" src="https://picsum.photos/300?image=870" /></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="op-l md:op-r ..."></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="op-l h:op-r ..."></div>