Create Responsive Animated Website Using HTML & CSS.

 OUTPUT:



We have also created a custom scroll-bar with a gradient color.

index.html

#The navigation Bar:(html)
<div class="navbar">
        <nav>
            <ul>
                <li class="icon"><i class="fa fa-headphones" id="headphone" aria-hidden="true"><a class="music">MyMusic</a></i></li>
                <--!making the headphone icon !-->
                <li>HOME</li>
                <li>ABOUT</li>
                <li>GALLERY</li>
                <li>CONTACT</li>
                <button class="button-1">Sign Up</button>
            </ul>
        </nav>
    </div>
'
#Styling the navigation:(CSS)-
        .navbar {

            height90px;
            background#0c1029;
        }



        ul {
            margin-left250px;
            displayflex;
        }

        li {
            font-family'Dekko'cursive;

            transition.4s;
            cursorpointer;
            margin-top20px;
            colorantiquewhite;
            padding20px;
            list-stylenone;
        }

        li:hover {
            color#b61ed1;
        }

        .button-1 {
            cursorpointer;
            background#d61155;
            colorantiquewhite;
            width110px;
            height50px;
            font-weightbold;
            bordersolid #d61155;
            border-radius35px;
            margin-top24px;
            margin-left400px;
            transition.6s;
        }

        .button-1:hover {
            backgroundantiquewhite;
            border-color#ffffff;
            color#e20e5f;
            transformtranslateY(-10px);

        }


We have also created an icon of our Webpage(MyMusic.com). So, we will first import that font from font awesome.

<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

Some amazing fonts from The Google fonts API:

<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Dekko&family=Rubik:wght@500&display=swap" rel="stylesheet">

#We will be using them later...

LETS CREATE THE MAIN CONTENT.


<div class="header">
        <h1><strong><a class="musicforall">Music</a> for everyone</strong></h1><img src="23938-removebg-preview.png"><br>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            Accusantium blanditiis, voluptate fuga doloribus ipsam debitis, ratione unde d
            oloremque hic nostrum possimus vitae aliquam temporibus assumenda ducimus quas
            ipsa perspiciatis, perferendis.</p><br>
        <button class="but2"><a class="shu" href="#">Download App Now</a></button>
         <button class="but3">Start 30 days Free Trial</button>
    </div>

Styling it with CSS
.header {
            margin-top140px;
            margin-left140px;
            font-size2rem;
            font-familyArial Rounded MT;
        }

        .musicforall {
            color#ff0089;
        }

        h1 {
            coloraliceblue;
        }

        p {
            width700px;
            font-size20px;

            colorazure;
            font-family: Candara;
        }

        .but2,
        .but3 {
            bordersolid;
            border-radius50px;
            padding10px;
            font-familyArial Rounded MT;
            coloraliceblue;
        }

        .but2 {
            background#ff0045;
            border-color#ff0045;
        }

        .but3 {
            backgroundgrey;
            border-colorgrey;
        }

        .but2:hover {
            transformtranslateY(-10px);
        }

        .but3:hover {
            transformtranslateY(-10px);
        }

        img {
            positionabsolute;
            margin-left720px;
            margin-top-130px;
            width400px;
            height400px;
            animation-name: hovereffect;
            animation-duration4s;
            animation-iteration-countinfinite;
            animation-directionalternate;

        }
        @keyframes hovereffect {
            from {
                transformscale(1);
            }

            to {
                transformscale(1.3);
            }
        }

        .shu {
            coloraliceblue;
        }


CREATING THE CUSTOM SCROLL-BAR:-

main.css

        ::-webkit-scrollbar {
            width20px;
        }

        ::-webkit-scrollbar-thumb {
            border-radius30px;
            background-webkit-gradient(linearleft topleft bottomfrom(#ff8a00), to(#da1b60));
            box-shadowinset 2px 2px 2px rgba(2552552550.25), inset -2px -2px -2px rgba(0000.25);


        }


FULL CODE USED:

index.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>MyMusic.com</title>
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Rubik:wght@500&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Dekko&family=Rubik:wght@500&display=swap" rel="stylesheet">
    

</head>

<body>

    <div class="navbar">
        <nav>
            <ul>
                <li class="icon"><i class="fa fa-headphones" id="headphone" aria-hidden="true"><a class="music">MyMusic</a></i></li>
                <li>HOME</li>
                <li>ABOUT</li>
                <li>GALLERY</li>
                <li>CONTACT</li>
                <button class="button-1">Sign Up</button>
            </ul>
        </nav>
    </div>
    <div class="header">
        <h1><strong><a class="musicforall">Music</a> for everyone</strong></h1><img src="23938-removebg-preview.png"><br>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            Accusantium blanditiis, voluptate fuga doloribus ipsam debitis, ratione unde d
            oloremque hic nostrum possimus vitae aliquam temporibus assumenda ducimus quas
            ipsa perspiciatis, perferendis.</p><br>
        <button class="but2"><a class="shu" href="https://play.google.com/store/apps/details?id=com.spotify.music">Download App Now</a></button> <button class="but3">Start 30 days Free Trial</button>
    </div><br>
</body></html>


main.css

* {
            margin0;
            padding0;
        }

        button {
            cursorpointer;
            transition.4s;
        }

        body {
            height1400px;
            background-color#081d2f;
        }

        a {
            text-decorationnone;
        }

        .navbar {

            height90px;
            background#0c1029;
        }



        ul {
            margin-left250px;
            displayflex;
        }

        li {
            font-family'Dekko'cursive;

            transition.4s;
            cursorpointer;
            margin-top20px;
            colorantiquewhite;
            padding20px;
            list-stylenone;
        }

        li:hover {
            color#b61ed1;
        }

        .button-1 {
            cursorpointer;
            background#d61155;
            colorantiquewhite;
            width110px;
            height50px;
            font-weightbold;
            bordersolid #d61155;
            border-radius35px;
            margin-top24px;
            margin-left400px;
            transition.6s;
        }

        .button-1:hover {
            backgroundantiquewhite;
            border-color#ffffff;
            color#e20e5f;
            transformtranslateY(-10px);

        }


        i {
            margin-left10px;
            positionrelative;
            margin-top-6px;
            font-size30px;
            cursorauto;
        }

        .music {
            positionrelative;
            margin-top30px;
            font-size15px;
            text-decorationnone;
            font-familymonospace;
        }

        .icon {
            animation-name: rotateyo;
            animation-directionalternate;
            animation-duration.5s;
            animation-iteration-countinfinite;
            animation-fill-mode:

        }

        .icon:hover {
            text-shadow2px 2px 8px #ff7600;
            color#ff0058;
        }



        @keyframes rotateyo {
            from {
                transformrotate(5deg);
            }

            to {
                transformrotate(-5deg);
            }
        }

        .header {
            margin-top140px;
            margin-left140px;
            font-size2rem;
            font-familyArial Rounded MT;
        }

        .musicforall {
            color#ff0089;
        }

        h1 {
            coloraliceblue;
        }

        p {
            width700px;
            font-size20px;

            colorazure;
            font-family: Candara;
        }

        .but2,
        .but3 {
            bordersolid;
            border-radius50px;
            padding10px;
            font-familyArial Rounded MT;
            coloraliceblue;
        }

        .but2 {
            background#ff0045;
            border-color#ff0045;
        }

        .but3 {
            backgroundgrey;
            border-colorgrey;
        }

        .but2:hover {
            transformtranslateY(-10px);
        }

        .but3:hover {
            transformtranslateY(-10px);
        }

        img {
            positionabsolute;
            margin-left720px;
            margin-top-130px;
            width400px;
            height400px;
            animation-name: hovereffect;
            animation-duration4s;
            animation-iteration-countinfinite;
            animation-directionalternate;

        }

        ::-webkit-scrollbar {
            width20px;
        }

        ::-webkit-scrollbar-thumb {
            border-radius30px;
            background-webkit-gradient(linearleft topleft bottomfrom(#ff8a00), to(#da1b60));
            box-shadowinset 2px 2px 2px rgba(2552552550.25), inset -2px -2px -2px rgba(0000.25);


        }

        @keyframes hovereffect {
            from {
                transformscale(1);
            }

            to {
                transformscale(1.3);
            }
        }

        .shu {
            coloraliceblue;
        }

        .copywright {
            backgroundgrey;
        }

_________________________________________________


THANK YOU.....


Article By:

Shubham Sagar
www.youtube.com/c/coveringtheworld
https://www.instagram.com/shubham.__.sagar

For Business Queries: codestar712@gmail.com

Code Star, India



















No comments:

Powered by Blogger.