HTML記述例
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>【コーディング練習】CONCEPT | Harvest Restaurant</title>
<link rel="stylesheet" href="../css/concept.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Catamaran:wght@400;700&family=Noto+Sans+JP:wght@400;700&display=swap" rel="stylesheet">
</head>
<body class="subPage">
<header class="header">
<h1><span>concept</span></h1>
ここにハンバーメニューが入る
</header>
<main class="main-content">
<section class="article">
<h2>口に入れた瞬間<br class="onlySP">カラダが喜ぶ</h2>
<p class="lead">
自家農園で太陽の光をたっぷり浴びた<br>
採れたて・無農薬のお野菜をふんだんに使っています
</p>
<section class="conceptDetailSec">
<h3>Fresh</h3>
<p class="photo">
<img src="../img/concept_ph01.jpg" alt="">
</p>
<p class="text">
カラフルサラダでしっかりビタミンをチャージ。<br>
朝採れ野菜のパリッとした食感と自家製ドレッシングをお楽しみください。
</p>
</section>
<section class="conceptDetailSec reverse">
<h3>Healthy</h3>
<p class="photo">
<img src="../img/concept_ph02.jpg" alt="">
</p>
<p class="text">
メインはすべて熟練の一流シェフによる創作料理。<br>
地元の新鮮な食材を使用し、ヘルシーな調理法にこだわっています。
</p>
</section>
<section class="conceptDetailSec">
<h3>Mindful</h3>
<p class="photo">
<img src="../img/concept_ph03.jpg" alt="">
</p>
<p class="text">
自然の木々から差し込む優しい光。一口一口味わう食材そのものの旨み。<br>
都会とは違うゆったりとした時間が流れています。
</p>
</section>
</section>
</main>
<footer class="footer">
<p><img src="../img/footer_logo.svg" alt=""></p>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="../js/script.js"></script>
</body>
</html>
@charset "URF-8";
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
ul, li {
list-style: none;
}
a {
color: inherit;
text-decoration: none;
}
img {
max-width: 100%;
vertical-align: bottom;
}
body {
color: #333;
font-size: 16px;
font-family: 'Catamaran', 'Noto Sans JP', sans-serif;
line-height: 1.0;
}
.subPage {
text-align: center;
line-height: 1.5;
}
.header {
margin-bottom: 30px;
padding-top: 70px;
border-top: 14px solid #f5f5f5;
}
.header h1 {
font-size: 42px;
font-weight: 700;
letter-spacing: .17em;
text-transform: uppercase;
}
.header h1 span {
background-image: linear-gradient(135deg,#e6ba5d 0%,#9ac78a 100%);
background-clip: text;
background-clip: text;
background-clip: text;
color: transparent;
}
.subPage h2 {
font-size: 20px;
margin-bottom: 20px;
letter-spacing: .17em;
}
.subPage h3 {
font-size: 30px;
margin-bottom: 30px;
}
.subPage .lead {
font-size: 14px;
margin-bottom: 30px;
}
@media screen and (min-width: 768px) {
.subPage h1 {
font-size: 60px;
}
.subPage h2 {
font-size: 34px;
margin-bottom: 36px;
letter-spacing: .2em;
}
.subPage h3 {
font-size: 50px;
margin-bottom: 40px;
}
.subPage .lead {
font-size: 18px;
margin-bottom: 200px;
}
.onlySP {
display: none;
}
}
.main-content {
width: min(90%, 1240px);
margin: 0 auto;
}
.conceptDetailSec {
margin-bottom: 40px;
}
.conceptDetailSec .photo {
margin-bottom: 20px;
}
.conceptDetailSec .photo img {
width: 100%;
height: 180px;
object-fit: cover;
object-position: center 90%;
}
.conceptDetailSec .text {
text-align: left;
font-size: 13px;
}
@media screen and (min-width: 768px) {
.conceptDetailSec {
display: grid;
grid-template-columns: 40% 60%;
grid-template-rows: 360px 360px;
gap: 20px;
}
.conceptDetailSec h3 {
grid-row: 1 / 2;
grid-column: 2 / 3;
}
.conceptDetailSec .photo {
grid-column: 1 / 2;
grid-row: 1 / 3;
}
.conceptDetailSec .text {
grid-column: 2 / 3;
grid-row: 2 / 3;
}
.conceptDetailSec .photo img {
height: 720px;
}
.conceptDetailSec h3 {
align-self: end;
}
.conceptDetailSec .text {
text-align: center;
font-size: 16px;
}
.reverse {
grid-template-columns: 60% 40%;
}
.reverse h3 {
grid-column: 1 / 2;
grid-row: 1 / 2;
}
.reverse .photo {
grid-column: 2 / 3;
grid-row: 1 / 3;
}
.reverse .text {
grid-column: 1 / 2;
grid-row: 2 / 3;
}
}
.footer {
background: url(../img/footer_mt.svg) no-repeat right top;
background-size: 200px;
margin-top: 60px;
padding-top: 68px;
}
.footer p {
background-color: #f5f5f5;
text-align: left;
}
.footer img {
width: 188px;
transform: translateY(-28px);
}