<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kuronekopunk</author_name>
  <author_url>https://blog.hatena.ne.jp/kuronekopunk/</author_url>
  <blog_title>ノンカフェインであなたにやさしい</blog_title>
  <blog_url>https://akinobu.net/</blog_url>
  <categories>
    <anon>CSS</anon>
    <anon>HTML</anon>
  </categories>
  <description>CSSで高さを可変にして縦横比(アスペクト比)を維持する方法です。 縦横比(アスペクト比)1:1のサイズで幅に合わせて高さを可変にしたい時などに使えます。 paddingの特性を使って実現しています。さっそく使い方から。 CSSで高さを可変にして縦横比(アスペクト比)を維持する方法 まずはhtmlから &lt;div class=&quot;box&quot;&gt; &lt;div class=&quot;box__content&quot;&gt; text text &lt;/div&gt; &lt;/div&gt; cssはこう .box { height: auto; position: relative; width: 100%; } .box::before { c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fakinobu.net%2Fentry%2F2016%2F11%2F17%2F220541&quot; title=&quot;CSSで高さを可変にして縦横比(アスペクト比)を維持する - ノンカフェインであなたにやさしい&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-11-17 22:05:41</published>
  <title>CSSで高さを可変にして縦横比(アスペクト比)を維持する</title>
  <type>rich</type>
  <url>https://akinobu.net/entry/2016/11/17/220541</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
