x

Open in GithubOpen in StackBlitz
@twicpics-components
Documentation

anchor property

The anchor property positions the image in both contain andcovermode.

It allows to:
  • position the letterboxed image in its container incontainmode.
  • determine what should be visible when the image is cropped in  cover mode.

Accepted values aretop,bottom,leftright,top-left,top-right,bottom-leftbottom-rightandcenter.

Please note that anchor is applied after an eventual transformation defined with  preTransform  property.

For a more specific positionning see  position  or  focus  properties in for containor covermode respectively.

anchor="center"mode="contain"
anchor="center"mode="contain"
anchor=centermode="cover"
anchor="center"mode="cover"