728x90
반응형
HTML코드
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="2_grid실습.css">
</head>
<body>
<div id="wrapper">
<div class="card">
<header>
<h3>모바일 HTML</h3>
</header>
<figure><img src="../Resource/books/book1.jpg" alt="HTML"></figure>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Iste quos commodi harum voluptas inventore quo dolor numquam quaerat perspiciatis! Similique dignissimos voluptatum officiis repellendus quos hic molestias, optio iste sequi.</p>
</div>
<div class="card">
<header>
<h3>CSS3</h3>
</header>
<figure><img src="../Resource/books/css.jpg" alt="CSS"></figure>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius veniam quibusdam repudiandae, doloremque nam aperiam. Ipsa vero minus quam at minima possimus nostrum ab, facilis facere voluptatem soluta optio voluptas?</p>
</div>
<div class="card">
<header>
<h3>바닐라 자바스크립트</h3>
</header>
<figure><img src="../Resource/books/js.jpg" alt="JAVA"></figure>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem et enim at eos suscipit necessitatibus atque? Ex dolorum harum autem beatae, natus vitae assumenda? Non cumque accusantium adipisci autem nobis.</p>
</div>
</div>
</body>
</html>
CSS코드
body{
font-size: 16px;
background-color: black;
}
#wrapper{
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.card {
background-color: #fff;
box-shadow: 5px 10px 25px white;
text-align: center;
}
.card > header {
font-size: 2rem;
padding: 0.5px;
}
.card > p {
line-height: 1.6em;
}
img {
display: block;
margin: auto;
max-width: 100%;
min-height: 30rem;
}
728x90
반응형