[수코딩] [HTML/CSS] Full Screen Landing Page 만들기 (배경 이미지 본문 내용 참고) / 웹코딩 / 실습

2023. 1. 16. 03:16FrontEnd & Mobile/HTML & CSS

(110) [HTML/CSS] Full Screen Landing Page 만들기 (배경 이미지 본문 내용 참고) / 웹코딩 / 실습 - YouTube

 

 

 

 

참고자료)

 

<a href="#"> </a>

a href="#" 무엇을 의미? (velog.io)

 

a href="#" 무엇을 의미?

<a href="

velog.io

 

pixabay.com 사이트 : 사진들이 있는 사이트

 

 

[index1.html]

<!DOCTYPE html>
<html lang="en">
<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>Easy Full Screen Lading Page</title>
    <link href="https://fonts.googleapis.com/css?
    family-Dancing+Script|Questrial&display-swap" rel="stylesheet">
    <link href="style1.css" rel="stylesheet" />
</head>
<body>
    <div id="main">
        <div id="contents">
            <h1>Simple, One Page Design</h1>
            <p>A free landing page theme with video background</p>
            <a href="#">Get Started</a>
        </div>
    </div>
</body>
</html>

 

 

 

[style1.css]

html, body{
    margin: 0;
    padding: 0;
}
h1, p{
    margin: 0;
}
a{
    color: inherit;
    text-decoration: none;
}
#main{
    background: url("https://pixabay.com/get/gf795d9f1d159d52abdd11d667ebd69453c477b6624f202f9693a0f1d0fafcb53b199d1a4c304b4afa87266b6666e42d01addbac22a163f6f8aa90165a299ac2f14c12cfef36ea71f50c3daf1986714ea_1920.jpg") no-repeat;
    background-size: cover;
    background-position: center center;
    width: 100vw;
    height: 100vh;
    font-family: 'Questrial', sans-serif;
}
#contents{
    position: absolute;
    top: 50%;
    width: 100%;
    color: white;
    text-align: center;
}
#contents h1{
    font-family: 'Dancing Script', cursive;
    font-size: 70px;
    margin-bottom: 16px;
}
#contents p{
    font-size: 23px;
    margin-bottom: 16px;
}
#contents a{
    display: inline-block;
    border:2px solid white;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 17px;
    font-weight: bold;
    transition: all 0.5s;
}
#contents a:hover{
    background-color: gray;
}
@media(max-width:769px){
    #contents h1{
        font-size: 50px;
    }
    #contents p{
        font-size: 20px;
    }
    #contents a{
        font-size: 14px;
    }
}

 

 

 

결과)

http://127.0.0.1:5500/index1.html#