set object-fit javascript code example Example: object-fit values in css img{ object-fit: cover|contain|fill|none|scale-down; }