css contain cover code example Example 1: css cover background-size: cover; Example 2: css image cover object-fit: contain;