October 25, 2024
Chicago 12, Melborne City, USA
CSS

“object-fit: contain” not working in PrimeNg p-image


CSS "object-fit: contain" does not work in PrimeNg p-image component.

<p-image [src]="image" alt="Image" appendTo="body" height="550vw" width="100%" style="object-fit: contain"></p-image>

Is there anything i missed. Also tried it with a different way with the same result:

[style]="{ objectFit: 'contain' }"



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video