Beautiful & Simple Home Page Design

 HTML CODE

<!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>Dear page</title>
    <link rel="stylesheet" href="./css/style.css">
</head>
<body>
    <header class="background">
        <div class="container">
            <div class="navbar">
                <div class="home">
                    <a class="items" href="">HOME</a>
                </div>

                <div class="about">
                    <a class="items" href="">CONTACT</a>
                </div>

                <div class="about">
                    <a class="items" href="">ABOUT</a>
                </div>
            </div>

            <div class="discription">
                <h1 class="bold">IMPOSSIBLE</h1>
                <h1 class="normal">only means that you haven't found solution yet</h1>
               
            </div>

            <a href="" class="btn1">SET UP NOW</a>
            <p class="d-para">Move ahead to success</p>
        </div>

        <h1 class="madan">- By Madan</h1>
    </header>
   
</body>
</html>

CSS CODE

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Lobster&family=Montserrat:wght@400;700&family=Open+Sans:wght@500;600&family=Ubuntu:wght@500&display=swap');

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

html{
    font-size: 62.5%;
}

body{font-family: 'Open Sans', sans-serif;}

.background{
    background:linear-gradient(rgb(0,0,0,0.5),rgb(0,0,0,0.5)),  url("../img/marcela-laskoski-YrtFlrLo2DQ-unsplash.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
}

.container{
    max-width: 135rem;
    margin: 0 auto;
}


.navbar{
    /* border: 4px solid black; */
    display: flex;
    padding-top: 2rem;
}

.navbar .items{
    font-size: 1.8rem;
    margin: 0 1.5rem;
    text-decoration: none;
    color: white;
}

.items:hover{
    border-bottom: 2px solid;
    border-image: linear-gradient(to left, white, yellow, red) 1;
}


.discription{
    width: 50rem;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-45%,-50%);
   
}

.discription .bold{
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 9.8rem;
    font-weight: 100;
    text-align: center;
    color: white;
}

.discription .normal{
    margin-top: -2rem;
    text-align: center;
    color: white;
}

.btn1{
    text-decoration: none;
    color: white;
    background-color: coral;
    border: 2px solid rgb(255, 255, 255);
    font-size: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 40px;
    position: absolute;
    top: 68%;
    left: 52%;
    transform: translate(-52%,-54%);
}

.btn1:hover{
    background-color: rgb(255, 86, 80);
}

.d-para{
    position: absolute;
    font-size: 1.2rem;
    top: 73.2%;
    left: 54%;
    transform: translate(-73.2%,-54%);
    color: white;
}

.madan{
    color: white;
    position: absolute;
    top: 80%;
    left: 58%;
    transform: translate(-80%, -58%);
    font-family: 'Lobster', cursive;
    font-weight: 100;
}


/* ------------------------------------------------------------------------ */

@media (max-width: 300px){
    html{
        font-size: 50%;
    }

    .navbar{
        margin: 0 auto;
    }

    .discription{
        width: 30rem;
        padding-bottom: 0.1rem;
    }

    .discription .bold{
        font-size: 5rem;

    }

    .d-para{
        top: 72.2%;
        left: 60%;
    }

    .discription .normal{
        font-size: 1rem;
        margin-top: -1rem;
    }



}

@media(min-width:301px) and (max-width:400px){
    html{
        font-size: 52%;
    }

    .navbar{
        width: 30rem;
        margin: 0 auto;
    }

    .discription{
        width: 30rem;
        padding-bottom: 0.1rem;
    }

    .discription .bold{
        font-size: 6rem;

    }

    .d-para{
        top: 72.2%;
        left: 59.5%;
    }

    .discription .normal{
        font-size: 1rem;
        margin-top: -1rem;
    }

}

@media(min-width:401px) and (max-width:500px){
    html{
        font-size: 52%;
    }

    .navbar{
        width: 30rem;
        margin: 0 auto;
    }

    .discription{
        max-width: 80rem;
        padding-bottom: 0.1rem;
    }

    .discription .bold{
        font-size: 6.8rem;

    }

    .d-para{
        top: 72.2%;
        left: 56.5%;
    }

    .discription .normal{
        font-size: 1.3rem;
        margin-top: -1rem;
    }
}

@media(min-width:500.1px) and (max-width:760px){
    html{
        font-size: 55%;
    }

    .navbar{
        width: 30rem;
        margin: 0 auto;
    }

    .discription{
        max-width: 80rem;
        padding-bottom: 0.1rem;
    }

    .discription .bold{
        font-size: 7rem;

    }

    .d-para{
        top: 72.2%;
        left: 55.5%;
    }

    .discription .normal{
        font-size: 1.4rem;
        margin-top: -1rem;
    }
}

@media(min-width:760.1px) and (max-width:900px){
    html{
        font-size: 60%;
    }
    .discription .bold{
        font-size: 7rem;
    }
    .d-para{
        top: 72.4%;
        left: 55%;
    }

    .discription .normal{
        font-size: 1.4rem;
        margin-top: -1rem;
    }
}

@media(min-width:900.1px) and (max-width:1200px){
    .d-para{
        top: 72.6%;
        left: 54%;
    }
}

@media(min-height:800px) and (max-width:950){
    .background{
        height: 100%;
        width: 100%;

    }
}

@media (orientation: landscape) and (max-height:500px){
    .background{
        height: 90vmax;
    }

    .d-para{
        top: 76.2%;
        left: 56%;
    }

    .madan{
        top: 90%;
    }
}


Images can be added by you according to requirement

Comments

Popular posts from this blog

Gsap effect on click

Gsap timeline position parameters

Scroll magic javascript