Tagged articles
2 articles
Page 1 of 1
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Jul 20, 2017 · Frontend Development

How to Scale and Crop Images to a Fixed 80×80 Box with CSS

This guide explains how to uniformly scale backend‑provided images of varying dimensions to fit an 80×80 container by proportionally resizing based on the shorter side and then cropping the central area, with a simple CSS solution using background‑size and background‑position, including a cover shortcut.

CSSImage ScalingResponsive Design
0 likes · 3 min read
How to Scale and Crop Images to a Fixed 80×80 Box with CSS
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Jun 7, 2016 · Frontend Development

How to Achieve Proportional Image and Video Scaling with CSS

This article explains how to maintain correct aspect ratios for images and videos in responsive layouts by setting only one dimension for images and using an intrinsic‑ratio container with padding‑bottom for videos, complete with practical CSS code examples.

CSSImage ScalingVideo Aspect Ratio
0 likes · 3 min read
How to Achieve Proportional Image and Video Scaling with CSS