object-view-box
Allows you to specify a 'view box' for an image or video, similar to how viewBox works in SVG. This essentially lets you crop or zoom into a specific part of a replaced element using CSS.
It is documented as part of the CSS Images specification. This is an experimental technology. The syntax and behavior are still subject to change.
Syntax
/* Usage Example */
.zoomed-image {
/* Crops the image to a specific rectangle area */
object-view-box: inset(10% 20% 30% 40%);
}
/* Syntax */
object-view-box: none;
/* Global values */
object-view-box: inherit;
object-view-box: initial;
object-view-box: revert;
object-view-box: revert-layer;
object-view-box: unset;
object-view-box Browser support
This feature is not Baseline because it does not work in some of the most widely-used browsers.