Skip to content

Commit

Permalink
Coded the First page of Natours Website with html and css
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashAditya639 committed Aug 11, 2023
1 parent 09cc348 commit 10d6983
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 0 deletions.
118 changes: 118 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,122 @@ Dark green: #28b485
*/

* {
margin: 0;
padding: 0;
}

body {
font-family: "Lato";
font-size: 16px;
line-height: 1.7;
color: #777;
padding: 30px;
}

.header {
height: 95vh;
background-image: linear-gradient(
to right bottom,
#7ed56fb7,
#28b485b8) ,url(../img/hero.jpg);
background-size: cover;
background-position: top;
clip-path: polygon(0 0,100% 0,100% 75vh,0 100%);
position: relative;
}

.header_img_box {
position: absolute;
top: 40px;
left: 40px;
}

.header_img {
width: 35%;
}

.header_description_box {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%,-50%);
text-align: center;
}

.header_description {
font-family: "Lato";
color: #fff;
margin-bottom: 60px;
}

.header_description_main {
display: block;
text-transform: uppercase;
font-weight: 400;
font-size: 60px;
letter-spacing: 35px;
animation: moveInLeft 1s ease-out;
}

.header_description_sub {
display: block;
text-transform: uppercase;
font-weight: 700;
font-size: 20px;
letter-spacing: 17.4px;
animation: moveInRight 1s ease-out;
}

.btn:link,
.btn:visited {
text-transform: uppercase;
text-decoration: none;
padding: 15px 40px;
border-radius: 100px;
display: inline-block;
transition: all 0.2s;
}

.btn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
transform: translateY(-1px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.btn_white {
background-color: #fff;
color: #777;
}

@keyframes moveInLeft {
0% {
opacity: 0;
transform: translateX(-100px);
}
80% {
transform: translateX(10px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}

@keyframes moveInRight {
0% {
opacity: 0;
transform: translateX(100px);
}
80% {
transform: translateX(-10px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
27 changes: 27 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="css/icon-font.css">
</head>
<body>
<header class="header">
<div class="header_img_box">
<img class="header_img" src="img/logo-white.png" alt="logo_img_header">
</div>
<div class="header_description_box">
<h1 class="header_description">
<span class="header_description_main">outdoors</span>
<span class="header_description_sub">is where life happens</span>
</h1>
<a class="btn btn_white" href="#">
discover our tours
</a>
</div>
</header>
</body>
</html>

0 comments on commit 10d6983

Please sign in to comment.