<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kikiki-kiki</author_name>
  <author_url>https://blog.hatena.ne.jp/kikiki-kiki/</author_url>
  <blog_title>かもメモ</blog_title>
  <blog_url>https://chaika.hatenablog.com/</blog_url>
  <categories>
    <anon>HTML</anon>
    <anon>CSS</anon>
    <anon>Responsive</anon>
    <anon>Design</anon>
  </categories>
  <description>スマートフォン版のサイトなどを作る際に、例えば商品のサムネイル画像等をウィンドウ幅に合わせ、かつ中の画像を中央に表示させたいようなケースに結構遭遇します。 レスポンシブの正方形を作る vmin という単位を利用する方法 調べていると、widthとheightにvminという単位を使って、レスポンシブの正方形を作る方法がありました。 HTML &lt;div class=&quot;squareBox&quot;&gt; &lt;div class=&quot;content&quot;&gt;&lt;/div&gt; &lt;/div&gt; CSS .squareBox /* margin 30px */ width: calc(100vmin - 60px) height: …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchaika.hatenablog.com%2Fentry%2F2016%2F07%2F15%2F163004&quot; title=&quot;HTML・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>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kikiki-kiki/20160715/20160715162810.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-07-15 16:30:04</published>
  <title>HTML・CSS レスポンシブな正方形を作って、その中央にコンテンツを表示させたい。</title>
  <type>rich</type>
  <url>https://chaika.hatenablog.com/entry/2016/07/15/163004</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
