HTML
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Doors!</title>
<link rel="stylesheet" href="doors.css">
</head>
<body>
<div class="container">
<div class="doors">
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
<div class="door">
<div class="image"></div>
</div>
</div>
</div>
<h1 class="title">
Doors.
</h1>
</div>
</body>
</html>
CSS
body {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/bg.jpg");
background-size: cover;
background-repeat: no-repeat;
}
.container {
padding: 50px 0;
}
.doors {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 660px;
/* background-color: orangered; */
margin: 0 auto;
padding: 40px 20px;
}
.door {
width: 80px;
height: 84px;
margin: 4px;
background-color: #555;
border: 3px solid #fff;
transform: skewX(-14deg);
border-radius: 10px;
box-sizing: border-box;
transition: transform .1s, background-color .6s;
overflow: hidden;
}
.door:hover {
background-color: orangered;
transform: skewX(-14deg) scale(1.3);
z-index: 1;
}
.door .image {
width: 130%;
height: 100%;
background-size: cover;
transform: translateX(-11px) skewX(14deg);
background-position: center;
}
.door:nth-child(1) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img1.jpg")
}
.door:nth-child(2) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img2.jpg")
}
.door:nth-child(3) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img3.jpg")
}
.door:nth-child(4) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img4.jpg")
}
.door:nth-child(5) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img5.jpg")
}
.door:nth-child(6) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img6.jpg")
}
.door:nth-child(7) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img7.jpg")
}
.door:nth-child(8) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img8.jpg")
}
.door:nth-child(9) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img9.jpg")
}
.door:nth-child(10) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img10.jpg")
}
.door:nth-child(11) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img11.jpg")
}
.door:nth-child(12) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img12.jpg")
}
.door:nth-child(13) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img13.jpg")
}
.door:nth-child(14) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img14.jpg")
}
.door:nth-child(15) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img15.jpg")
}
.door:nth-child(16) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img16.jpg")
}
.door:nth-child(17) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img17.jpg")
}
.door:nth-child(18) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img18.jpg")
}
.door:nth-child(19) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img19.jpg")
}
.door:nth-child(20) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img20.jpg")
}
.door:nth-child(21) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img21.jpg")
}
.door:nth-child(22) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img22.jpg")
}
.door:nth-child(23) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img23.jpg")
}
.door:nth-child(24) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img24.jpg")
}
.door:nth-child(25) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img25.jpg")
}
.door:nth-child(26) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img26.jpg")
}
.door:nth-child(27) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img27.jpg")
}
.door:nth-child(28) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img28.jpg")
}
.door:nth-child(29) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img29.jpg")
}
.door:nth-child(30) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img30.jpg")
}
.door:nth-child(31) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img31.jpg")
}
.door:nth-child(32) .image {
background-image: url("https://raw.githubusercontent.com/ParkYoungWoong/door-selector/main/images/img32.jpg")
}
h1.title {
font-size: 30px;
font-weight: bold;
color: #333;
text-align: center;
}
'프론트엔드 > HTML' 카테고리의 다른 글
CSS 띄움을 이용한 레이아웃 + CSS clear의 활용 (0) | 2023.10.25 |
---|---|
애니메이션 201페이지 참고 (0) | 2023.10.23 |
실습 홈페이지도 만들어보기 (0) | 2023.10.18 |
박스 순서도 (0) | 2023.10.18 |
그림 지정하기 (0) | 2023.10.18 |