Css 背景画像 Max-Height

Best a References website

Css 背景画像 Max-Height. Web grab the width and height of the image, and calculate the ratio (x/y). If the ratio is greater than 70/50 (1.4), set the width to 70px and the height to (70 * x/y).

【CSS】backgroundimageで背景画像を設定する!|フライテック
【CSS】backgroundimageで背景画像を設定する!|フライテック from 52.199.119.32

Web grab the width and height of the image, and calculate the ratio (x/y). If the ratio is greater than 70/50 (1.4), set the width to 70px and the height to (70 * x/y). } that will set the height to 10% of the whichever smaller viewport you have.

If The Ratio Is Greater Than 70/50 (1.4), Set The Width To 70Px And The Height To (70 * X/Y).


} that will set the height to 10% of the whichever smaller viewport you have. Web grab the width and height of the image, and calculate the ratio (x/y).