レイアウトサンプル

 ここでは、幾つかのレイアウト例を表示してみました。  参考1  参考2
  1. flex box を使ったレイアウト01flex01
  2. flex box を使ったレイアウト02flex02
  3. flex box を使ったレイアウト03flex03
  4. grid box を使ったレイアウト01grid01
  5. table を使ったレイアウト01table01

  1. flex box を使ったレイアウト01  別窓表示
    1. <!DOCTYPE html>
    2. <html lang="ja">
    3. <head>
    4. <meta charset="utf-8" />
    5. <meta name="viewport" content="width=device-width,initial-scale=1.0">
    6. <title>HTML5とCSS3によるページサンプル</title>
    7. <style>
    8. body { width:400px; margin:10px auto; }
    9. header, nav, section, footer, article {
    10. display:block; border:1px solid #ccc; margin:5px; padding:5px 10px; background: #eee;
    11. }
    12. article { background: #efe; }
    13. header { text-align:center; padding:5px 0 10px 0; }
    14. header ul, header li { list-style-type:none; display:inline; padding: 0 10px; }
    15. .flexbox { display:flex; border:1px solid #c99; margin:5px; }
    16. nav { flex:1; }
    17. section { flex:2; }
    18. nav li { list-style-type:none; margin-left: -2em; }
    19. footer { text-align: center; }
    20. </style>
    21. </head>
    22. <body>
    23. <header>
    24. <h1>header</h1>
    25. <ul>
    26. <li><a href="#">Home</a></li>
    27. <li><a href="#">Menu 1</a></li>
    28. <li><a href="#">Menu 2</a></li>
    29. <li><a href="#">Menu 3</a></li>
    30. </ul>
    31. </header>
    32. <div class="flexbox">
    33. <nav>
    34. <h1>Navi</h1>
    35. <ul>
    36. <li><a href="http://www.tagindex.com/html5/basic/basic.html">HTML 5</a></li>
    37. <li><a href="http://www.htmq.com/html5/index.shtml">リファレンス</a></li>
    38. <li><a href="http://coliss.com/articles/build-websites/operation/css/css3-flexbox-properties-by-scotch.html">flex</a></li>
    39. <li><a href="#">example 4 </a></li>
    40. <li><a href="#">example 5 </a></li>
    41. <li><a href="#">example 6 </a></li>
    42. <li><a href="#">example 7 </a></li>
    43. </ul>
    44. </nav>
    45. <section>
    46. <h1>section</h1>
    47. <article>
    48. <h1>section-article1</h1>
    49. <p>ここは、article1</p>
    50. </article>
    51. <article>
    52. <h1>section-article2</h1>
    53. <p>ここは、article2</p>
    54. </article>
    55. </section>
    56. </div>
    57. <footer>
    58. footer
    59. </footer>
    60. </body>
    61. </html>

  2. flex box を使ったレイアウト02  別窓表示
    1. <!DOCTYPE html>
    2. <html lang="ja">
    3. <head>
    4. <meta charset="UTF-8" />
    5. <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes" />
    6. <title>Flexbox sample 13</title>
    7. <style>
    8. body { font: 24px Helvetica; background: #999; }
    9. header, footer{ margin:4px; padding:5px; min-height:44px; border-radius:7px; background:#feb; }
    10. .top-nav { display:flex; justify-content:center; font-size:14px; background: #eef; margin:4px; border-radius:7px; }
    11. .top-nav a { margin:5px 10px; border-radius:5px; background:#6B9;
    12. color:#fff; display:block; padding:10px 15px; text-decoration:none; }
    13. .top-nav li { list-style-type:none; position:relative; left:-1.5em; }
    14. .top-nav li:first-child { margin-right: auto; }
    15. .top-nav .logo { background: #99f; padding:0px; width:88px;height:34px; }
    16. .top-nav .logo img { position:relative; width:100px; height:36px; }
    17. .main { min-height:300px; margin:0px; padding:0px; display:flex; flex-flow:row; }
    18. .main > article{ margin:4px; padding:5px;
    19. border-radius:7px; background:#dd8; flex:3; order:2; }
    20. .main > nav{ margin:4px; padding:5px; border:1px solid #88b; border-radius:7px;
    21. background: #ccccff; flex:1; order:1; }
    22. .main >nav ul{ font-size:14px; list-style-type:none; }
    23. .main >nav li { list-style-type:none; position:relative; left:-2em; }
    24. .main >nav a { margin:5px 10px; border-radius:5px; background:#6c9;
    25. color:#eee; display:block; padding:5px; text-decoration:none; }
    26. .main > aside{ margin:4px; padding:5px; border:1px solid #88b; border-radius:7px;
    27. background: #ccf; flex:1; order:3; }
    28. .main > aside p{ font-size:14px; }
    29. .main .contents { display:flex; justify-content:center; align-items:center; }
    30. .main .contents .align { width:300px; height:150px; font-size:14px; padding:8pt; border-radius:7px; background:#F5F0CF; }
    31. </style>
    32. </head>
    33. <body>
    34. <header>header</header>
    35. <ul class="top-nav">
    36. <li><a href="../../../index.html" class="logo"><img src="LOyuki14.gif" ></a></li>
    37. <li><a href="http://www.webcreatorbox.com/tech/flexbox/" target="_blank">Menu 1</a></li>
    38. <li><a href="http://qiita.com/takanorip/items/a51989312160530d89a1" target="_blank">Menu 2</a></li>
    39. <li><a href="https://web-designer.cman.jp/css_ref/abc_list/flexbox/" target="_blank">Menu 3</a></li>
    40. <li><a href="http://www.tohoho-web.com/css/prop/flex.htm" target="_blank">Menu 4</a></li>
    41. </ul>
    42. <div class="main">
    43. <nav>side-nav
    44. <ul>
    45. <li><a href="#">Link 1</a></li>
    46. <li><a href="#">Link 2</a></li>
    47. <li><a href="#">Link 3</a></li>
    48. </ul>
    49. </nav>
    50. <article class="contents">
    51. <div class="align">
    52. このアイテムは、中央枠に justify-content:center; align-items:center; によって、左右、上下の中央に配置
    53. </div>
    54. </article>
    55. <aside>aside
    56. <p>
    57. この横3枠の並びは<br>flex: と order: で配置
    58. </p>
    59. </aside>
    60. </div>
    61. <footer>footer</footer>
    62. </body>
    63. </html>

  3. flex box を使ったレイアウト03  別窓表示
    1. <!DOCTYPE html>
    2. <html lang="ja">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" >
    6. <title>レスポンシブハンバーガー Web page</title>
    7. <style>
    8. *{ margin:0; }
    9. body { width:100%; height:100vh; margin: 0 auto; font-size:13px; line-height:150%; background:#eff; background: url(https://kurage.ready.jp/img/w8b.gif); }
    10. .wrap{ max-width:1200px; margin: 0px auto; padding:10px; }
    11. #waku01{ max-width: 100%; overflow:hidden; padding:15px 0 0; display:flex; align-items: center; text-align:center; }
    12. #topL { width:10%; }
    13. #topC { width:70%; color:#900; font-size:36px; font-weight:bold; height: 40px; font-family:Comic Sans MS }
    14. #topR { width:20%; }
    15. #waku11{ position:relative; max-width: 100%; margin:5px auto; padding:4px 8px; z-index:1; }
    16. .gnav-waku{ position:relative; margin:0 ; padding:0; z-index:100; }
    17. .gnav-waku label { padding: 11px 4px 9px; font-size:30px; background:#ada; opacity:0.2; border-radius:6px; cursor:pointer; position:fixed; top:10px; left:10px; } /*ボタン枠装飾*/
    18. .gnav-waku input:checked ~ label:before { display:inline-block;color:#fff; content: '\02630'; } /* '三'; '\f078'; */
    19. .gnav-waku label:hover { opacity:0.7; } /*ボタンホバー時*/
    20. .gnav-waku label:before{ color:#44d; font-weight: bold; content:'\02715'; } /* 'X \f00d' */
    21. .gnav-waku input { display:none; } /*チェックは不可視*/
    22. .gnav-waku input:checked ~ .gnav{ transform:translate(0, -300px); transition:0.5s; } /* 中身を表示 クリックで中身非表示 */
    23.  
    24. .gnav{ transition:0.5s; position:relative; top:0; padding-left:0px; display:flex; margin: 0px auto; }
    25. .gnav li { position:relative; width:19vw; margin:0; padding:0; text-align:center; z-index:100; list-style:none; }
    26. .gnav img { width:98%; height:100%; }
    27. .gnav li a{ border-radius:5px; background:#4b8; color:#ffe; display:block; margin:1px; padding: 3px 0 1px; text-decoration:none; height: 28px; line-height: 2; font-size: 14px; font-weight: bold; }
    28. .gnav li:hover > a{ background:#30b9ba; }
    29. .gnav li ul li{ overflow:hidden; width:100%; height:0; margin:0px; color:#ffe; transition:.3s;}
    30. .gnav li ul li a{ background:#30b9ba; }
    31. .gnav li:hover li:hover > a{ background:#80b9ba; }
    32. .gnav li ul{ position:absolute; top:100%; left:0; width:100%; margin:0; padding:0; }
    33. .gnav li ul li{ overflow:hidden; width:100%; height:0; color:#ffe; transition:.4s; }
    34. .gnav li:hover > ul > li{ overflow: visible; height: 32px;}
    35. .gnav li ul li ul{ top: 0; left:100%; }
    36. .gnav li ul li ul:before{ /* ul 直前に指定 */
    37. position: absolute; content: ""; top: 9px; left: -12px;
    38. width: 0; height: 0; border: 8px solid transparent;
    39. border-left-color: #eeeeee; /* 三角マーク色 */
    40. }
    41.  
    42. @media screen and (min-width:960px) { /* pc用 */
    43. .gnav{ width:950px; padding-left:1rem;}
    44. .gnav li:last-child ul li ul{ left: -100%; width:100%;}
    45. .gnav li:nth-last-child(2) ul li ul {left:-100%; width:100%;}
    46. .gnav li:last-child ul li ul:before{ /* 右端リストの三角マーク ul 直前に指定 */
    47. position:absolute; content:""; top:9px; left: 100%; margin-left: -4px;
    48. border:8px solid transparent; border-right-color:#eee; /* 三角マーク色 */
    49. }
    50. /* 右端前リストの三角マーク */
    51. .gnav li:nth-last-child(2) ul li ul:before {
    52. position: absolute; content: ""; top: 9px; left: 100%; margin-left: -4px;
    53. border: 8px solid transparent; border-right-color:#eee;
    54. }
    55. }
    56. @media (min-width:560px) and ( max-width:959px) { /* タブレット用 */
    57. .wrap{ width:95vw; }
    58. #topL, #topR{ width:0; display:none; }
    59. #topC{ width:100%;}
    60. .gnav{ width:98%; }
    61. .gnav li:last-child ul li ul{left: -100%; width:100%;}
    62. .gnav li:nth-last-child(2) ul li ul {left:-100%; width:100%;}
    63. .gnav li:last-child ul li ul:before{ /* 右端リストの三角マーク ul 直前に指定 */
    64. position:absolute; content:""; top:9px; left: 100%; margin-left: -4px;
    65. border:8px solid transparent; border-right-color:#eee; /* 三角マーク色 */
    66. }
    67. /* 右端前リストの三角マーク */
    68. .gnav li:nth-last-child(2) ul li ul:before {
    69. position: absolute; content: ""; top: 9px; left: 100%; margin-left: -4px;
    70. border: 8px solid transparent; border-right-color:#eee;
    71. }
    72. }
    73. @media (max-width:559px) { /* スマホ用 */
    74. .wrap{ width:95%; }
    75. #topL, #topR{ width:0; display:none; }
    76. #topC{ width:100%;;}
    77. .gnav{ position: fixed; width:33vw; margin:5em auto 0 0.5em; display:flex; flex-direction:column; z-index:90; }
    78. .gnav-waku label { 1color: #ede; background:#4b8; opacity:1; } /*ボタン濃く*/
    79. .gnav li ul:before{ position: absolute; content: ""; top: 9px; left: -12px; width: 0; height: 0; border: 8px solid transparent; border-left-color: #eee; } /* ul 直前三角マーク色 */
    80. .gnav li{ width: 95%; margin:0 auto; padding: 0; text-align:center; }
    81. .gnav li ul{ top:3px; left:100%; }
    82. #waku11{ position:relative; max-width: 1100px; margin:5px auto; padding:4px 8px; z-index:1; }
    83. }
    84.  
    85. .table10 { display: flex; flex-direction:column;line-height:1.6em; }
    86. .cap10, .cap11 { display: flex; flex-direction:row; }
    87. .cap10 { text-align: center; }
    88. .tr11 { display: flex; flex-direction:row; }
    89. .td11 { display: flex; flex-direction:column; }
    90. .table10, .cap11, .tr11 { width:100%; margin: 1px auto; }
    91. .cap00 { margin-top:12px; font-size:20px; text-align: center; color:#906; }
    92. .tr11 section { margin:0 1px; border-radius:5px; padding:3px; flex-grow:1; }
    93. .tr11 section:nth-child(2n+1) { width:20%; background-color:#eee; }
    94. .tr11 section:nth-child(2n) { width:80%; background-color:#eef; }
    95. @media (max-width:559px) { /* スマホ用 560 960 */
    96. #waku11 { position:absolute; top:4.5em; padding:4px 2px; z-index:1; }
    97. .tr11 { width:92vw; }
    98. /* 表の折返し */
    99. .cap10, .cap11 { display: flex; flex-direction:column; }
    100. .cap10 div:nth-child(2n) { display:none; }
    101. }
    102. </style>
    103. </head>
    104. <body>
    105. <div class="wrap">
    106. <section id="waku01">
    107. <div id="topL"></div>
    108. <div id="topC">レスポンシブ Web page</div>
    109. <div id="topR"></div>
    110. </section>
    111. <section class="gnav-waku" id="gnav-waku">
    112. <input type="checkbox" id="label1" >
    113. <label for="label1"></label>
    114. <ul class='gnav'>
    115. <li><a href='.index.html' title='top page'><img src='https://kurage.ready.jp/img/LOyuki14.gif'></a> <ul class='gnav-ul'>
    116. <li><a href='#'>Menu 11</a></li>
    117. <li><a href='#'>Menu 12</a>
    118. <ul>
    119. <li><a href='#'>Menu 121</a></li>
    120. <li><a href='#'>Menu 122</a></li>
    121. </ul>
    122. </li>
    123. <li><a href='#'>Menu 13</a></li>
    124. </ul>
    125. </li>
    126. <li><a href='#'>Menu 2</a>
    127. <ul class='gnav-ul'>
    128. <li><a href='#'>Menu 21</a>
    129. <ul>
    130. <li><a href='#'>Menu 211</a></li>
    131. <li><a href='#'>Menu 212</a></li>
    132. <li><a href='#'>Menu 213</a></li>
    133. </ul>
    134. </li>
    135. <li><a href='#'>Menu 22</a>
    136. <ul>
    137. <li><a href='#'>Menu 221</a></li>
    138. <li><a href='#'>Menu 222</a></li>
    139. <li><a href='#'>Menu 223</a></li>
    140. </ul>
    141. </li>
    142. <li><a href='#'>Menu 23</a></li>
    143. </ul>
    144. </li>
    145. <li><a href='#'>Menu 2</a>
    146. <ul class='gnav-ul'>
    147. <li><a href='#'>Menu 21</a>
    148. <ul>
    149. <li><a href='#'>Menu 211</a></li>
    150. </ul>
    151. </li>
    152. <li><a href='#'>Menu 22</a></li>
    153. <li><a href='#'>Menu 23</a>
    154. <ul>
    155. <li><a href='#'>Menu 231</a></li>
    156. </ul>
    157. </li>
    158. </ul>
    159. </li>
    160. <li><a href='#'>Menu 3</a>
    161. <ul class='gnav-ul'>
    162. <li><a href='#'>Menu 31</a>
    163. <ul>
    164. <li><a href='#'>Menu 311</a></li>
    165. </ul>
    166. </li>
    167. <li><a href='#'>Menu 32</a></li>
    168. </ul>
    169. </li>
    170. <li><a href='#'>Menu 4</a>
    171. <ul class='gnav-ul'>
    172. <li><a href='#'>Menu 41</a></li>
    173. <li><a href='#'>Menu 42</a>
    174. <ul>
    175. <li><a href='#'>Menu 421</a></li>
    176. </ul>
    177. </li>
    178. <li><a href='#'>Menu 43</a></li>
    179. </ul>
    180. </li>
    181. </ul>
    182. </section>
    183. <section id="waku11" >
    184. <div class="table10" >
    185. <div class="cap10">
    186. <div class="tr11">
    187. <section class="td11">分 類</section>
    188. <section class="td11">項 目</section>
    189. </div>
    190. <div class="tr11">
    191. <section class="td11">分 類</section>
    192. <section class="td11">項 目</section>
    193. </div>
    194. </div>
    195. <div class="cap11">
    196. <div class="tr11">
    197. <section class="td11">HTML 5</section>
    198. <section class="td11">
    199. <div class="d12">
    200. <a href="http://www.tohoho-web.com/html5/index.html" target="_blank" title="とほほ">HTML5とは</a>
    201.  <a href="http://www.tagindex.com/html5/basic/index.html" target="_blank" title="tagindex HTML5の基本">HTML5の基本</a>
    202.  <a href="http://www.htmq.com/html5/index.shtml" target="_blank" title="htmq.com">HTML5リファレンス</a></div>
    203. <div class="d12">
    204. <a href="http://www.html5-memo.com/first-html5/html5-001/" target="_blank" title="はじめてのHTML5">はじめてのHTML5</a>
    205.  <a href="http://www.html5-memo.com/html5-site/iphone_markup/" target="_blank">HTML5でサイト</a>
    206.  <a href="https://www.asobou.co.jp/blog/web/html5-3" target="_blank">コンテンツ・モデル</a></div>
    207. <div class="d12">
    208. <a href="http://www.webdlab.com/html/html5/" target="_blank">Webデザインラボ</a></div>
    209. <div class="d12">
    210. <a href="http://www.pori2.net/html5/index.html" target="_blank">HTML5時代のJavaScript入門</a></div>
    211. <div class="d12">
    212. <a href="http://webstajuku.html.xdomain.jp/" target="_blank">HTML/CSSの基礎</a></div>
    213. </section>
    214. </div>
    215. <div class="tr11">
    216. <section class="td11">CSS 3</section>
    217. <section class="td11">
    218. <div class="d12">
    219. <a href="http://www.htmq.com/css3/" target="_blank">リファレンス</a>
    220.  <a href="http://www.tohoho-web.com/css/specs.htm" target="_blank">CSS3関連規約</a>
    221.  <a href="https://developer.mozilla.org/ja/docs/Learn/CSS/CSS_layout/Introduction" target="_blank" title="CSS レイアウト入門">レイアウト</a>
    222.  <a href="http://www.osaka-kyoiku.ac.jp/~joho/html5_ref/css/background-size_css.php" target="_blank">HTML&CSS3</a></div>
    223. <div class="d12">
    224. <a href="http://www.nemuchan.com/css3/able.html" target="_blank">出来ること</a>
    225.  <a href="http://www.webcreatorbox.com/tech/flexbox/" target="_blank">flexboxで決まり</a>
    226.  <a href="https://weblan3.com/css/css_property" target="_blank" title="CSSプロパティ一覧">CSSプロパティ</a>
    227.  <a href="https://blog.universe-web.jp/5517/" target="_blank" title="CSSのルールセット">ルールセット</a></div>
    228. <div class="d12">
    229. <a href="http://taghtml.com/css/defaultstylesheet.html" target="_blank">Default CSS3</a>
    230.  <a href="http://tamachan.tama777.com/Reference/default_css.html" target="_blank">デフォルトCSS</a>
    231.  <a href="https://web-manabu.com/html-css20/" target="_blank">リセットCSS</a></div>
    232. <div class="d12">
    233. <a href="https://www.webprofessional.jp/css-viewport-units-quick-start/" target="_blank">CSSのvh/vw</a>
    234.  <a href="https://qiita.com/amamamaou/items/bb79bec002a6ff033810" target="_blank" title="window.getComputedStyle() で要素のスタイルを取得する">スタイルを取得</a>
    235.  <a href="https://ics.media/entry/200212/" target="_blank" title="CSSグラデーション">CSS Gradient</a></div>
    236. <div class="d12">
    237. <a href="https://developer.mozilla.org/ja/docs/Web/CSS/animation" target="_blank">CSS animation</a>
    238.  <a href="https://lopan.jp/css-animation-slideshow/" target="_blank">スライドショー</a></div>
    239. <div class="d12">
    240. <a href="https://www.e-sanwa.co.jp/sbs/column/20171020/" target="_blank">重ね表示</a>
    241.  <a href="https://www.webdesignleaves.com/pr/css/css_clip_path.html" target="_blank">clip-path</a></div>
    242. </section>
    243. </div>
    244. </div>
    245. <div class="cap11">
    246. <div class="tr11">
    247. <section class="td11">テンプレート</section>
    248. <section class="td11">
    249. <div class="d12">
    250. <a href="http://photoshopvip.net/archives/84488" target="_blank">FreeHTML5.Co</a></div>
    251. <div class="d12">
    252. <a href="https://hashimotosan.hatenablog.jp/entry/2019/05/28/164834" target="_blank">ブレイクポイント</a>
    253.  <a href="https://tree-file.com/web-design/understanding-viewport-for-responsive-webdesign/" target="_blank">viewport</a>
    254.  <a href="https://deaimobi.com/breakpoint/#i" target="_blank">ブラウザサイズ</a></div>
    255. <div class="d12">
    256. <a href="https://www.jqueryscript.net/accordion/Create-An-Accordion-Image-Menu-with-jQuery-jQuery-UI.html" target="_blank"></a></div>
    257. <div class="d12">
    258. <a href="https://www.webdesignleaves.com/pr/plugins/swiper_js.html" target="_blank" title="Swiper(v5/v6)の使い方">Swiper</a></div>
    259. </section>
    260. </div>
    261. <div class="tr11">
    262. <section class="td11">Script</section>
    263. <section class="td11">
    264. <div class="d12">
    265. <a href="https://www.jqueryscript.net/accordion/Create-An-Accordion-Image-Menu-with-jQuery-jQuery-UI.html" target="_blank">accordionImageMenu</a></div>
    266. <div class="d12">
    267. <a href="https://poland-it-blog.com/fourier_series_programming/#toc2" target="_blank">フーリエ級数</a>
    268.  <a href="http://www.maroon.dti.ne.jp/lance/js/" target="_blank">Sample is best! </a></div>
    269. <div class="d12">
    270. <a href="https://www.sejuku.net/blog/47722" target="_blank" title="プロトタイプ(prototype)の使い方">prototype</a>
    271.  <a href="https://oshiete.goo.ne.jp/qa/8593427.html" target="_blank" title="複数画像のランダム複数表示">複数画像ランダム表示</a></div>
    272. </section>
    273. </div>
    274. </div>
    275.  
    276. </section>
    277. </div>
    278. </body>
    279. </html>

  4. grid box を使ったレイアウト01  別窓表示
    1. <!DOCTYPE html>
    2. <html lang="ja">
    3. <head>
    4. <meta charset="utf-8">
    5. <meta content="width=device-width, initial-scale=1.0" name="viewport">
    6. <title>TITLE</title>
    7. <style type="text/css">
    8. *{ margin:0; padding:0; box-sizing:border-box; border:0; outline:0; padding-left: 0;
    9. vertical-align:baseline; background:transparent; list-style: none; }
    10. #container{ padding:5px;
    11. display:grid;
    12. grid:60px auto 1fr 60px/ 150px 1fr 200px;
    13. grid-template-areas:
    14. "headCnt headCnt headCnt"
    15. "menu menu menu"
    16. "leftCnt midCnt rightCnt"
    17. "footCnt footCnt footCnt";
    18. height:100vh;
    19. }
    20. .headCnt{ grid-area:headCnt; background:#ccf; font-size:36px; display:grid; align-content:center; justify-content: center; }
    21. #menu{ grid-area: menu; background:#6a6; }
    22. #menu{ display:grid; grid:40px/ repeat(5,1fr); font-size:0.8em; }
    23. #menu a{ color:#FFF; text-decoration:none; transition:.5s;
    24. display:grid; align-content: center; justify-content: center; line-height:1.8;
    25. }
    26. #menu a:hover{ background:#6d6; }
    27. .leftCnt{ grid-area:leftCnt; background:#efe; }
    28. .midCnt{ grid-area:midCnt; background:#eef; }
    29. .rightCnt{ grid-area:rightCnt; background:#fef; }
    30. .footCnt{ grid-area:footCnt; background:#ffe; }
    31. @media screen and (max-width:640px){
    32. #container{
    33. grid:60px auto 60px 1fr 60px 60px/ auto;
    34. grid-template-areas:
    35. "headCnt"
    36. "menu"
    37. "leftCnt"
    38. "midCnt"
    39. "rightCnt"
    40. "footCnt";
    41. }
    42. #menu{ grid:auto/ repeat(auto-fill,100%); }
    43. }
    44. </style>
    45. </head>
    46. <body>
    47. <div id="container">
    48. <div class="headCnt">タイトル</div>
    49. <nav id="menu">
    50. <a href="">HOME</a>
    51. <a href="">LINK1</a>
    52. <a href="">LINK2</a>
    53. <a href="">LINK3</a>
    54. <a href="">LINK4</a>
    55. </nav>
    56. <div class="leftCnt">leftCnt</div>
    57. <div class="midCnt">midCnt</div>
    58. <div class="rightCnt">rightCnt</div>
    59. <div class="footCnt">footCnt</div>
    60. </div>
    61. </body>
    62. </html>

  5. table を使ったレイアウト01  別窓表示
    1. <!DOCTYPE html>
    2. <html lang="ja">
    3. <head>
    4. <meta charset="UTF-8">
    5. <title>文章型トップページ</title>
    6. <!link href="hpb9tm10_1.css" rel="stylesheet" type="text/css" id="hpb9tm10_1">
    7. <link href="table01.css" rel="stylesheet" type="text/css">
    8. </head>
    9. <body>
    10. <div class="wrap">
    11. <table border="0" class="hpb-head">
    12. <tbody>
    13. <tr>
    14. <td class="hpb-head-cell1"><a href="#SKIP_LINK">タイトル</a></td>
    15. </tr>
    16. </tbody>
    17. </table>
    18.  
    19. <table class="hpb-main">
    20. <tbody>
    21. <tr>
    22. <td class="hpb-side-cell3">
    23. <table border="0" class="hpb-vmenu1">
    24. <tbody>
    25. <tr>
    26. <td class="hpb-vmenu1-idle1"><a href="#" class="hpb-vmenu1-link1">リンク 1</a></td>
    27. </tr>
    28. <tr>
    29. <td class="hpb-vmenu1-idle1"><a href="#" class="hpb-vmenu1-link1">リンク 2</a></td>
    30. </tr>
    31. <tr>
    32. <td class="hpb-vmenu1-idle1"><a href="#" class="hpb-vmenu1-link1">リンク 3</a></td>
    33. </tr>
    34. <tr>
    35. <td class="hpb-vmenu1-idle1"><a href="#" class="hpb-vmenu1-link1">リンク 4</a></td>
    36. </tr>
    37. <tr>
    38. <td class="hpb-vmenu1-idle1"><a href="#" class="hpb-vmenu1-link1">リンク 5</a></td>
    39. </tr>
    40. <tr>
    41. <td class="hpb-vmenu1-idle1"><a href="#" class="hpb-vmenu1-link1">リンク 6</a></td>
    42. </tr>
    43. </tbody>
    44. </table>
    45. </td>
    46.  
    47. <td class="hpb-cnt-cell3-x"><a id="SKIP_LINK"></a>
    48. <table border="0" class="hpb-lb-tb1">
    49. <tbody>
    50. <tr>
    51. <td class="hpb-lb-tb1-cell1"><span class="hpb-body4">トップページ</span></td>
    52. <td class="hpb-lb-tb1-cell2"><img src="https://kurage.ready.jp/jtaisetu/jnenkan/150916b.jpg" alt="イメージ" width="406" height="305" style="vertical-align: bottom;"></td>
    53. </tr>
    54. </tbody>
    55. </table>
    56. <table border="0" class="hpb-lb-tb1">
    57. <tbody>
    58. <tr>
    59. <td colspan="2" class="hpb-lb-tb1-cell3"><br>
    60. <div class="hpb-lay-photo1"><br>
    61. <table width="100%" border="0" class="hpb-subh02">
    62. <tbody>
    63. <tr>
    64. <td class="hpb-subh02-cell1">ここに最新情報のタイトルを書きます</td>
    65. </tr>
    66. </tbody>
    67. </table>
    68. <table width="100%" border="0" class="hpb-dp-tb1">
    69. <tbody>
    70. <tr>
    71. <td align="left" valign="top" class="hpb-dp-tb1-cell1">最近更新した内容や、新しい話題について記述します。<br>
    72. ホームページを訪れる方が、最新情報にスムーズたどり着けるための気配りです。 </td>
    73. <td width="186" align="right" valign="top" class="hpb-dp-tb1-cell2"><img src="https://kurage.ready.jp/img/panda15.gif" alt="" width="186" border="0"></td>
    74. </tr>
    75. </tbody>
    76. </table>
    77. </div>
    78. <div class="hpb-lay-photo1"><br>
    79. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="hpb-subh02">
    80. <tbody>
    81. <tr>
    82. <td class="hpb-subh02-cell1">ここに主なページのタイトルを書きます</td>
    83. </tr>
    84. </tbody>
    85. </table>
    86. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="hpb-dp-tb1">
    87. <tbody>
    88. <tr>
    89. <td align="left" valign="top" class="hpb-dp-tb1-cell1">ホームページの主なページの概要を記述します。<br>
    90. トップページでホームページの内容を簡潔に説明すれば、訪れるかたに効果的にアピールすることができます。</td>
    91. <td width="186" align="right" valign="top" class="hpb-dp-tb1-cell2"><img src="https://kurage.ready.jp/img/mi12.gif" alt="" width="186" height="146" border="0"></td>
    92. </tr>
    93. </tbody>
    94. </table>
    95. </div>
    96. <br>
    97. </td>
    98. </tr>
    99. </tbody>
    100. </table>
    101. </td>
    102. </tr>
    103. <tr>
    104. <td height="18" valign="top" class="hpb-side-cell4"> </td>
    105. <td valign="top" class="hpb-cnt-cell4"> </td>
    106. </tr>
    107. </tbody>
    108. </table>
    109. </div>
    110. </body>
    111. </html>

■ 参考サイト