サブページメイン写真

3カラムレイアウト 3:2 Images picture 詳細版

3:2比率の画像とpictureを使った3カラムのレスポンシブのレイアウトサンプル。

3-3-3カラム

テスト画像
テスト画像
テスト画像

■Windowsの「高DPI設定」と「通常DPI設定」の両方で2倍の画像を表示させる

<div class="main-inner flex gap-13">

<div class="flex-3-3-3-for-3-2">
<picture>
<source media="(max-width:416px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-3-240-160.jpg" width="240" height="160">
<source media="(max-width:464px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-3-270-180.jpg" width="270" height="180">
<img decoding="async" loading="lazy" src="https://example.com/img/spacer.png" data-src="https://example.com/img/img-3-3-3-612-408.jpg" alt="テスト画像" width="612" height="408" class="lazyload ar3-2 fadein">
</picture>
</div>

</div>

●ウィンドウサイズ416px以下の時に表示させる画像

https://example.com/img/img-3-3-3-240-160.jpg

●ウィンドウサイズ417px~464pxの時に表示させる画像

https://example.com/img/img-3-3-3-270-180.jpg

●それ以外(ウィンドウサイズ465px以上)の時に表示させる画像

https://example.com/img/img-3-3-3-612-408.jpg

■画像サイズのイレギュラー

※ウィンドウ幅「416px」と「464px」と「465px以上」の時の画像は3:2の比率の画像が整数にならず、表示枠より少し大きいサイズの3:2の画像を使用。

■PC用レイアウトの時の注意

※3分割のレイアウトで3:2の画像を使う時は表示サイズが整数にならず、画像がぼやけるので表示サイズが整数になるように3:2画像専用のCSSgap-13flex-3-3-3-for-3-2で調整。

3-3-2カラム

テスト画像
テスト画像
テスト画像

■Windowsの「高DPI設定」と「通常DPI設定」の両方で2倍の画像を表示させる

<div class="main-inner flex gap-13">

<div class="flex-3-3-2-for-3-2">
<picture>
<source media="(max-width:416px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-2-372-248.jpg" width="372" height="248">
<source media="(max-width:464px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-2-420-280.jpg" width="420" height="280">
<img decoding="async" loading="lazy" src="https://example.com/img/spacer.png" data-src="https://example.com/img/img-3-3-2-612-408.jpg" alt="テスト画像" width="612" height="408" class="lazyload ar3-2 fadein">
</picture>
</div>

</div>

●ウィンドウサイズ416px以下の時に表示させる画像

https://example.com/img/img-3-3-2-372-248.jpg

●ウィンドウサイズ417px~464pxの時に表示させる画像

https://example.com/img/img-3-3-2-420-280.jpg

●それ以外(ウィンドウサイズ465px以上)の時に表示させる画像

https://example.com/img/img-3-3-2-612-408.jpg

■画像サイズのイレギュラー

※ウィンドウ幅「416px」と「464px」「465px以上」の時の画像は3:2の比率の画像が整数にならず、表示枠より少し大きいサイズの3:2の画像を使用。

■PC用レイアウトの時の注意

※3分割のレイアウトで3:2の画像を使う時は表示サイズが整数にならず、画像がぼやけるので表示サイズが整数になるように3:2画像専用のCSSgap-13flex-3-3-2-for-3-2で調整。

3-3-1カラム

テスト画像
テスト画像
テスト画像

■Windowsの「高DPI設定」と「通常DPI設定」の両方で2倍の画像を表示させる

<div class="main-inner flex gap-13">

<div class="flex-3-3-1-for-3-2">
<picture>
<source media="(max-width:416px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-1-768-512.jpg" width="768" height="512">
<source media="(min-width:465px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-1-612-408.jpg" width="612" height="408">
<img decoding="async" loading="lazy" src="https://example.com/img/spacer.png" data-src="https://example.com/img/img-3-3-1-864-576.jpg" alt="テスト画像" width="864" height="576" class="lazyload ar3-2 fadein">
</picture>
</div>

</div>

●ウィンドウサイズ416px以下の時に表示させる画像

https://example.com/img/img-3-3-1-768-512.jpg

●ウィンドウサイズ465px以上の時に表示させる画像

https://example.com/img/img-3-3-1-612-408.jpg

●それ以外(ウィンドウサイズ417px~464px)の時に表示させる画像

https://example.com/img/img-3-3-1-864-576.jpg

■画像サイズのイレギュラー

※ウィンドウ幅「465px以上」の時の画像は3:2の比率の画像が整数にならず、表示枠より少し大きいサイズの3:2の画像を使用。

■PC用レイアウトの時の注意

※3分割のレイアウトで3:2の画像を使う時は表示サイズが整数にならず、画像がぼやけるので表示サイズが整数になるように3:2画像専用のCSSgap-13flex-3-3-1-for-3-2で調整。

■間違いやすいのでメモ

※一番サイズの大きい「ウィンドウサイズ417px~464pxの時の画像」をimgに設定して、記述を削減してる。

3-2-2カラム

テスト画像
テスト画像
テスト画像

■Windowsの「高DPI設定」と「通常DPI設定」の両方で2倍の画像を表示させる

<div class="main-inner flex gap-13">

<div class="flex-3-2-2-for-3-2">
<picture>
<source media="(max-width:416px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-2-2-372-248.jpg" width="372" height="248">
<source media="(max-width:464px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-2-2-420-280.jpg" width="420" height="280">
<source media="(min-width:881px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-2-2-612-408.jpg" width="612" height="408">
<img decoding="async" loading="lazy" src="https://example.com/img/spacer.png" data-src="https://example.com/img/img-3-2-2-834-556.jpg" alt="テスト画像" width="834" height="556" class="lazyload ar3-2 fadein">
</picture>
</div>

</div>

●ウィンドウサイズ416px以下の時に表示させる画像

https://example.com/img/img-3-2-2-372-248.jpg

●ウィンドウサイズ417px~464pxの時に表示させる画像

https://example.com/img/img-3-2-2-420-280.jpg

●ウィンドウサイズ881px以上の時に表示させる画像

https://example.com/img/img-3-2-2-612-408.jpg

●それ以外(ウィンドウサイズ465px~880px)の時に表示させる画像

https://example.com/img/img-3-2-2-834-556.jpg

■画像サイズのイレギュラー

※ウィンドウ幅「416px」「464px」「880px」「881px以上」の時の画像は3:2の比率の画像が整数にならず、表示枠より少し大きいサイズの3:2の画像を使用。

■PC用レイアウトの時の注意

※3分割のレイアウトで3:2の画像を使う時は表示サイズが整数にならず、画像がぼやけるので表示サイズが整数になるように3:2画像専用のCSSgap-13flex-3-2-2-for-3-2で調整。

■間違いやすいのでメモ

※一番サイズの大きい「ウィンドウサイズ465px~880pxの時の画像」をimgに設定して、記述を削減してる。

3-2-1カラム

テスト画像
テスト画像
テスト画像

■Windowsの「高DPI設定」と「通常DPI設定」の両方で2倍の画像を表示させる

<div class="main-inner flex gap-13">

<div class="flex-3-2-1-for-3-2">
<picture>
<source media="(max-width:416px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-2-1-768-512.jpg" width="768" height="512">
<source media="(min-width:881px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-2-1-612-408.jpg" width="612" height="408">
<source media="(min-width:465px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-2-1-834-556.jpg" width="834" height="556">
<img decoding="async" loading="lazy" src="https://example.com/img/spacer.png" data-src="https://example.com/img/img-3-2-1-864-576.jpg" alt="テスト画像" width="864" height="576" class="lazyload ar3-2 fadein">
</picture>
</div>

</div>

●ウィンドウサイズ416px以下の時に表示させる画像

https://example.com/img/img-3-2-1-768-512.jpg

●ウィンドウサイズ881px以上の時に表示させる画像

https://example.com/img/img-3-2-1-612-408.jpg

●ウィンドウサイズ465px~880pxの時に表示させる画像

https://example.com/img/img-3-2-1-834-556.jpg

●それ以外(ウィンドウサイズ417px~464px)の時に表示させる画像

https://example.com/img/img-3-2-1-864-576.jpg

■画像サイズのイレギュラー

※ウィンドウ幅「880px」「881px以上」の時の画像は3:2の比率の画像が整数にならず、表示枠より少し大きいサイズの3:2の画像を使用。

■PC用レイアウトの時の注意

※3分割のレイアウトで3:2の画像を使う時は表示サイズが整数にならず、画像がぼやけるので表示サイズが整数になるように3:2画像専用のCSSgap-13flex-3-2-1-for-3-2で調整。

■間違いやすいのでメモ

※一番サイズの大きい「ウィンドウサイズ417px~464pxの時の画像」をimgに設定して、記述を削減してる。

3-1-LRカラム

テスト画像
サンプル文章。
テスト画像
サンプル文章。

■要素の右左を逆にする時

<div class="flex-3-3-1-wrap">
<div class="flex-3-3-1-left-for-3-2">
<picture>
<source media="(max-width:416px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-1-left-768-512.jpg" width="768" height="512">
<source media="(min-width:465px)" srcset="https://example.com/img/spacer.png" data-srcset="https://example.com/img/img-3-3-1-left-612-408.jpg" width="612" height="408">
<img decoding="async" loading="lazy" src="https://example.com/img/spacer.png" data-src="https://example.com/img/img-3-3-1-left-864-576.jpg" alt="テスト画像" width="864" height="576" class="lazyload ar3-2 fadein">
</picture>
</div>
<div class="flex-3-3-1-right left">
サンプル文章。
</div>
</div>

要素を逆にする時はflex-3-3-1-wrapflex-3-3-1-wrap-revにする。

配置を逆にしてもモバイル表示の時は写真が上、テキストが下のレイアウト。

■PC用レイアウトの時の注意

※3分割のレイアウトで3:2の画像を使う時は表示サイズが整数にならず、画像がぼやけるので表示サイズが整数になるように3:2画像専用のCSSflex-3-3-1-left-for-3-2で調整。

Menu