Web Page (HTML/CSS)

박찬영·2024년 1월 19일
0

Toy Project

목록 보기
7/13
post-thumbnail

1. html 코드

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Design House</title>
    <link href="./style.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <div class="header">
            <h1><a href="#">DESIGN</a></h1>
            <div class="nav">
                <ul>
                    <li><a href="#">HOME</a></li>
                    <li><a href="#">BEDROOM</a></li>
                    <li><a href="#">DINING</a></li>
                    <li><a href="#">KITCHEN</a></li>
                    <li><a href="#">BACKYARD</a></li>
                </ul>
            </div>
        </div>
        <div class="hero">
            <h2>DESIGN YOUR HOUSE</h2>
            <p>Subscribe Easy Youtube Channel to watch more videos,<br>press t he bell icon to get latest updates.</p>
            <button>more videos</button>
        </div>
    </div>
</body>
</html>

2. css 코드

@font-face{
    font-family: abster;
    src:url(font/abster-webfont.woff) format('woff');
}

*{
    margin:0;
    padding:0;
    box-sizing: border-box;
}

.container{
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url(./images/room.jpg);
}

.container .header{
    width: 80%;
    height: 80px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container .header h1 a{
    text-decoration: none;
    color: white;
    font-family: abster;
}

.container .nav ul li{
    display: inline-block;
    margin-right: 10px;
}

.container .nav ul li a{
    text-decoration: none;
    color: white;
}

.container .nav ul li a:hover{
    color: #1fdfdf;
}

.container .hero{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.container .hero h2{
    font-size: 60px;
    margin-bottom: 20px;
}

.container .hero p{
    font-size: 22px;
}

.container .hero button{
    background: none;
    border:2px solid darkseagreen;
    color: white;
    padding: 15px 20px;
    border-radius: 20px;
    margin-top: 30px;
    outline: none;
    cursor:pointer;
    transition: all .4s;
}

.container .hero button:hover{
    background-color: darkslategray;
}

3. 결과

profile
블로그 이전했습니다 -> https://young-code.tistory.com

0개의 댓글

관련 채용 정보