<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Surprisedblog</author_name>
  <author_url>https://blog.hatena.ne.jp/Surprisedblog/</author_url>
  <blog_title>IT the Best</blog_title>
  <blog_url>https://www.it-the-best.com/</blog_url>
  <categories>
    <anon>JavaScript-レスポンシブデザイン</anon>
    <anon>JavaScript</anon>
    <anon>レスポンシブデザイン</anon>
    <anon>JavaScript-matchMedia</anon>
    <anon>matchMedia</anon>
  </categories>
  <description>JavaScriptによるレスポンシブ対応の実現方法をresize/observer/matchMedia別にまとめました。サンプルコードもあるので参考になればと思います。主に画面幅/要素の横幅の変更時にスタイルを変更することを想定して作成しました。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.it-the-best.com%2Fentry%2Fjs-responsive-matchMedia&quot; title=&quot;【JS】window.matchMediaで画面横幅に対応した処理をする。resizeイベント、observerと比較 | JavaScriptでのレスポンシブデザイン - IT the Best&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/S/Surprisedblog/20210902/20210902183946.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-09-16 13:00:00</published>
  <title>【JS】window.matchMediaで画面横幅に対応した処理をする。resizeイベント、observerと比較 | JavaScriptでのレスポンシブデザイン</title>
  <type>rich</type>
  <url>https://www.it-the-best.com/entry/js-responsive-matchMedia</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
