object-fit
object-fit
`object-fit` は、画像、ビデオ、または類似のアイテムがそのボックス内にどのように収まるかを制御します。
もう一つの例
マーケットプレイスでは、販売者の写真を `object-fit: cover` を使って4:3のボックスに入れます。`object-position` の保存された焦点により、顔が目の位置で切り取られないようにします。製品の図は代わりに `contain` を使い、空白を追加することで、すべての注釈が見えるようにします。
主な部分
- 01コンテンツボックス
- 02置き換えられたメディア
- 03適合と焦点位置
以下の場合に使用します
計画された切り抜きが許容される場合は `cover` を使用してください。すべての部分を表示したままにする必要がある場合は `contain` を使用し、非常に幅広いメディアや非常に高いメディアでテストしてください。
以下の場合は使用しないでください
グラフ、スクリーンショット、QRコード、またはドキュメントに対して `cover` を使用しないでください。切り取りにより必要な情報が失われる可能性があります。
コードで使用する名前
object-fit: cover|contain + object-position 出荷前に
Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience.
Outcome:Complete the task with object-fit (object-fit)。 User context:マーケットプレイスでは、販売者の写真を `object-fit: cover` を使って4:3のボックスに入れます。`object-position` の保存された焦点により、顔が目の位置で切り取られないようにします。製品の図は代わりに `contain` を使い、空白を追加することで、すべての注釈が見えるようにします。 Design concept to apply:object-fit (object-fit)。 Why it fits:計画された切り抜きが許容される場合は `cover` を使用してください。すべての部分を表示したままにする必要がある場合は `contain` を使用し、非常に幅広いメディアや非常に高いメディアでテストしてください。 Do not use it when:グラフ、スクリーンショット、QRコード、またはドキュメントに対して `cover` を使用しないでください。切り取りにより必要な情報が失われる可能性があります。 Design requirements: Set the content order, shared design values, and reusable components. Define how the layout changes by screen size and state. Keep useful design choices separate from decoration. Inclusion and resilience: Check contrast, zoom, languages, themes, and reduced motion when needed. Do not use color or effects as the only way to show meaning. Acceptance criteria: The design stays clear on phones and desktops, at zoom, in every theme, and in all supported languages. Interactive states stay clear and consistent. Evidence and limits (evidence boundary):きちんとした書類でも、まだドラフトやリリース候補、あるいは最終版かもしれません。ステータスや、ブラウザやプラットフォームの対応状況を確認しましょう。 Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.
このリクエストを確認する
Review how object-fit (object-fit) is used now. Definition: `object-fit` は、画像、ビデオ、または類似のアイテムがそのボックス内にどのように収まるかを制御します。 Release checks: Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.