無제
[HD] HD 해상도에 최적화 된 웹사이트 코딩 실무 예제 본문
HD 1366 최적화

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>m</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div>
<a href="#" onclick="return false">hd</a>
</div>
<nav>
<ul>
<li><a href="#" onclick="return false">About</a></li>
<li><a href="#" onclick="return false">Work</a></li>
<li><a href="#" onclick="return false">Blog</a></li>
<li><a href="#" onclick="return false">Recruit</a></li>
<li><a href="#" onclick="return false">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div>
<h1>High definition</h1>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s.</p>
<button>Read more</button>
</div>
</main>
<article class="topic">
<section>
<img src="https://images.unsplash.com/photo-1551369277-a930560141bb?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1552&q=80">
<h3>Hot Topic 01</h3>
<p>2013/05/16</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make.</p>
<button>Read more</button>
</section>
<section>
<img src="https://images.unsplash.com/photo-1550856015-de3a3956c67d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80">
<h3>Hot Topic 02</h3>
<p>2015/02/31</p>
<p>In blandit ultrices leo. In ut ante tortor. Pellentesque laoreet nunc felis, nec porta lectus cursus maximus.
Ut nec risus vel velit suscipit mattis in tempus justo. Suspendisse a lacinia dui suscipit et.</p>
<button>Read more</button>
</section>
<section>
<img src="https://images.unsplash.com/photo-1550668180-3205f7bb6a9e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80">
<h3>Hot Topic 03</h3>
<p>2020/12/02</p>
<p>Vestibulum massa sapien, sodales nec eros quis, ullamcorper feugiat tellus. Mauris placerat hendrerit euismod.
Sed eget magna purus. In rutrum sed sem non faucibus. Nunc vel mollis elit. porttitor pulvinar.</p>
<button>Read more</button>
</section>
</article>
<article class="why">
<h2>Why do we use it?</h2>
<p>It is a long established fact that a reader will be <br>distracted by the readable content of a page when looking at its layout.</p>
</article>
<footer>
<div>
<div>
[ facebook ] [twitter]
</div>
<address>
70, Sanggye-ro, Nowon-gu, Seoul, Republic of Korea
</address>
</div>
</footer>
</body>
</html>
@charset "utf-8";
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css?family=Oswald&display=swap');
@import url('https://fonts.googleapis.com/css?family=Playfair+Display&display=swap');
* {
margin: 0;
padding: 0;
list-style: none;
box-sizing: border-box;
word-break: keep-all;
overflow-wrap: break-word;
outline: 0px solid silver;
}
body {
font-family: 'Roboto', sans-serif;
font-size: 0.9rem;
line-height: 1rem;
color: #999;
letter-spacing: 0.1px;
}
h1, h2, h3 {
font-family: 'Oswald', sans-serif;
}
h1 {
font-size: 4rem;
line-height: 4rem;
text-transform: uppercase;
}
h2 {
font-size: 2.4rem;
line-height: 2.4rem;
text-transform: uppercase;
}
h3 {
font-size: 1.4rem;
line-height: 1.4rem;
}
h4, h5 {
font-family: 'Playfair Display', serif;
}
h4 {
font-size: 1.1rem;
line-height: 1.1rem;
}
h5 {
font-size: 0.7rem;
line-height: 0.7rem;
}
a:link {
color: #666;
text-decoration: none;
}
a:visited {
color: #666;
}
a:hover {
color: red;
}
a:active {
color: red;
}
button {
font-size: 0.7rem;
text-transform: uppercase;
padding: 10px 30px;
border: 1px solid #ccc;
background: white;
transform: 0.3s;
}
button:hover {
background: crimson;
color: white;
cursor: pointer;
}
img {
width: 100px;
}
/* start */
header, .topic, footer>div {
width: 1000px;
margin: 0 auto;
display: flex;
justify-content: space-between;
}
header {
line-height: 3.5rem;
text-transform: uppercase;
}
header div {
font-size: 1.6rem;
font-weight: bold;
}
header nav ul li {
display: inline-block;
padding: 0 0 0 40px;
}
main {
position: relative;
height: 500px;
margin: 0 0 48px;
background: url('https://images.unsplash.com/photo-1510674288907-1b60ac093e87?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80') no-repeat;
background-size: cover;
background-position: center center;
}
main div {
position: absolute;
width: 600px;
color: white;
right: 5%;
bottom: 80px;
}
main div * {
padding: 0 0 8px;
}
main div button {
padding: 10px 30px;
}
.topic {
margin: 0 auto 48px;
}
.topic section {
width: 320px;
}
.topic section img {
width: 320px;
height: 160px;
}
.topic section * {
padding: 0 0 12px;
}
.topic section button {
padding: 10px 30px;
}
.why {
background: #333;
padding: 80px 0;
text-align: center;
}
footer {
background: #eee;
padding: 32px 0;
}
footer div:first-child {
font-size: 1rem;
font-weight: bold;
}
/* end */
'<401>' 카테고리의 다른 글
| [Active and fixed] 유저의 움직임에 반응하는 웹사이트 코딩 실무 예제 (0) | 2026.04.10 |
|---|---|
| [Flexible and fixed] 브라우저 넓이에 반응하는 웹사이트 코딩 실무 예제 (0) | 2026.04.08 |
| 코드 해석_0327_product/flex/position/relative/absolute/wrap/overflow/hidden/opacity/transition/z-index/transform/translate (0) | 2026.03.27 |
| 코드 해석_3/27_노란 박스를 화면 정중앙에 배치시키는 방법 (0) | 2026.03.27 |
| 코드 해석_0326_뱃지/종/아이콘/폰트어썸/플렉스/저스티피콘텐츠/포지션/릴레티브/앱솔루트 (0) | 2026.03.26 |