CSS : object-fit 和 object-position实现 图片或视频自适应 img { 100%; height: 300px; object-fit: cover; object-position: top center; }