IMAGE / 084

Circular crop

円形にトリミング
同じ素材を円の領域に切り抜いて見せます。

実際のHTML・CSSで描かれた見本です。

ラボで詳しく試す ↗

ひとつ試すなら

どこが変わるかを観察して、似た表現と見比べてみよう。

こんなときに

アバターや、図版の輪郭をそろえるとき。

仕組みと使い方

重要な被写体が切れないか、中心位置も確認します。

トリミング丸切り抜きcrop
実装コードを見る
<style>
.sample{width:100%;height:100%;min-height:190px;display:grid;place-items:center;position:relative;overflow:hidden;box-sizing:border-box;font-family:Arial,'Hiragino Kaku Gothic ProN',Meiryo,sans-serif;color:#20211d;background:#f1f0e9;padding:22px}.sample *{box-sizing:border-box}.sample button,.sample input,.sample summary{font:inherit}.sample button,.sample summary,.sample label{touch-action:manipulation}.sample :focus-visible{outline:3px solid #6050bf;outline-offset:5px}.sample small{font-size:10px;line-height:1.5}.sample .editable{margin:0}.sample svg{max-width:100%;height:auto}
.sample svg{width:170px;height:140px;clip-path:circle(62px at 50% 50%)}
</style>
<div class="sample">
<svg viewBox="0 0 240 160" role="img" aria-label="オレンジの太陽と紫の山の図形イラスト"><rect width="240" height="160" fill="#c2dfdb"/><circle cx="168" cy="46" r="29" fill="#ff7540"/><path d="M0 150 85 45 155 145 207 87 240 131V160H0Z" fill="#8c79bd"/><path d="m0 113 49-25 85 72H0Z" fill="#cedb70"/></svg>
</div>