<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>カスタムコード on qwerty.work</title>
        <link>https://qwerty.work/tags/%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%B3%E3%83%BC%E3%83%89/</link>
        <description>Recent content in カスタムコード on qwerty.work</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>ja-JP</language>
        <lastBuildDate>Mon, 01 Jul 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://qwerty.work/tags/%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%B3%E3%83%BC%E3%83%89/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>【STUDIO】よく使うカスタムコード（CSS他）</title>
            <link>https://qwerty.work/post/2024/07/studio%E3%82%88%E3%81%8F%E4%BD%BF%E3%81%86%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%B3%E3%83%BC%E3%83%89css/</link>
            <pubDate>Mon, 01 Jul 2024 00:00:00 +0000</pubDate>
            <guid>https://qwerty.work/post/2024/07/studio%E3%82%88%E3%81%8F%E4%BD%BF%E3%81%86%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%B3%E3%83%BC%E3%83%89css/</guid>
            <description>&lt;h2 id=&#34;css&#34;&gt;CSS&#xA;&lt;/h2&gt;&lt;h3 id=&#34;スマホの横長画面対応&#34;&gt;スマホの横長画面対応&#xA;&lt;/h3&gt;&lt;p&gt;スマホを横向きにしたとき、キービジュアルの高さを&lt;strong&gt;1vh&lt;/strong&gt;で指定したときに、高さが足りずレイアウトが崩れるため、最低限の高さを指定。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;style&amp;gt;/* スマホの細い横長画面対応 * メインビジュアル高さ指定 *//* 画面高さが540px以下で横向きの場合 */@media screen and (max-height: 540px) and (orientation: landscape) {  #任意のid {      height: 840px !important;  }}/* 縦横比が1200px:768px以下の細長さで横向きの場合 */@media screen and (max-aspect-ratio: 1200/768) and (orientation: landscape) {  #任意のid {      height: 760px !important;  }}&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;正方形の画像のレスポンシブ対応&#34;&gt;正方形の画像のレスポンシブ対応&#xA;&lt;/h3&gt;&lt;p&gt;画像を正方形で縦横をそれぞれピクセルで指定した際、画面サイズによってはレイアウトが崩れないように小さめに配置することがありますが、1:1の縦横比を保ったまま画面に合わせて、拡大縮小を行う例。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;style&amp;gt;#任意のid .image.sd {    width: 100%;    height: auto;    aspect-ratio: 1;}&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;lighthouseパフォーマンス対策&#34;&gt;Lighthouseパフォーマンス対策&#xA;&lt;/h2&gt;&lt;p&gt;Lighthouseのベンチマークで「パフォーマンス」で指摘される部分の対策。ページ読み込みスピードの高速化に寄与。ページ読み込み時にあらかじめ接続をする&lt;strong&gt;preconnect&lt;/strong&gt;と、あらかじめ名前解決しておく&lt;strong&gt;dns-prefetch&lt;/strong&gt;。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;link rel=&amp;#34;preconnect&amp;#34; href=&amp;#34;https://www.googletagmanager.com&amp;#34; /&amp;gt;&amp;lt;link rel=&amp;#34;preconnect&amp;#34; href=&amp;#34;https://storage.googleapis.com&amp;#34; /&amp;gt;&amp;lt;link rel=&amp;#34;preconnect&amp;#34; href=&amp;#34;https://fonts.googleapis.com&amp;#34; /&amp;gt;&amp;lt;link rel=&amp;#34;preconnect&amp;#34; href=&amp;#34;https://analytics.studiodesignapp.com&amp;#34; /&amp;gt;または&amp;lt;link rel=&amp;#34;dns-prefetch&amp;#34; href=&amp;#34;https://www.googletagmanager.com&amp;#34; /&amp;gt;&amp;lt;link rel=&amp;#34;dns-prefetch&amp;#34; href=&amp;#34;https://storage.googleapis.com&amp;#34; /&amp;gt;&amp;lt;link rel=&amp;#34;dns-prefetch&amp;#34; href=&amp;#34;https://fonts.googleapis.com&amp;#34; /&amp;gt;&amp;lt;link rel=&amp;#34;dns-prefetch&amp;#34; href=&amp;#34;https://analytics.studiodesignapp.com&amp;#34; /&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
        </item></channel>
</rss>
