<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kjugk</author_name>
  <author_url>https://blog.hatena.ne.jp/kjugk/</author_url>
  <blog_title>Goodpatch Tech Blog</blog_title>
  <blog_url>https://goodpatch-tech.hatenablog.com/</blog_url>
  <categories>
    <anon>css</anon>
    <anon>uegaki</anon>
  </categories>
  <description>aspect-ratio Design Div 所属フロントエンドエンジニアの上垣です。 この記事では、css の aspect-ratio プロパティを使って、要素のアスペクト比を指定する方法を紹介します。 padding hack width が可変の要素に、特定の割合で高さを与える(=アスペクト比を決める) には、 padding hack という手法が良く使われていました。 padding hack でアスペクト比を指定する例 See the Pen Untitled by Koji (@kjugk) on CodePen. 垂直方向の padding を % で指定すると、包含ブロッ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgoodpatch-tech.hatenablog.com%2Fentry%2Fcss-aspect-ratio&quot; title=&quot;aspect-ratio で要素のアスペクト比を指定する - Goodpatch Tech Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/g/goodpatch-tech/20220604/20220604171053.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-06-07 09:23:07</published>
  <title>aspect-ratio で要素のアスペクト比を指定する</title>
  <type>rich</type>
  <url>https://goodpatch-tech.hatenablog.com/entry/css-aspect-ratio</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
