Membuat Tampilan webiste Toko Online HTML,CSS,JS

Membuat Tampilan webiste Toko Online HTML,CSS,JS

Konten [Tampil]
Membuat Tampilan webiste Toko Online HTML,CSS,JS #part 1

Membuat Website dengan tampilan elegan sangatlah menarik para pembaca untuk mengunjungi website kalian nah lantas bagaimana membuat website toko online dengan tampilan yang elegen mari simak berikut penjelasannya.

Yang pertama kita buat rangkain tubuhnya, cara cepatnya simpan terlebih dahulu file tersebut lalu masukan tanda seru ‘!’ lalu enter maka akan otomatis membuat rangkain tubuh website.

Cara Membuat Tampilan Awal Webiste Toko Online HTML

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>E Store - eCommerce HTML Template</title>
        <meta content="width=device-width, initial-scale=1.0" name="viewport">
        <meta content="eCommerce HTML Template Free Download" name="keywords">
        <meta content="eCommerce HTML Template Free Download" name="description">

        <!-- Favicon -->
        <link href="img/favicon.ico" rel="icon">

        <!-- Google Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400|Source+Code+Pro:700,900&display=swap" rel="stylesheet">

        <!-- CSS Libraries -->
        <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
        <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
        <link href="lib/slick/slick.css" rel="stylesheet">
        <link href="lib/slick/slick-theme.css" rel="stylesheet">

        <!-- Template Stylesheet -->
        <link href="css/style.css" rel="stylesheet">
    </head>

    <body>
        <!-- Top bar Start -->
        <div class="top-bar">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-6">
                        <i class="fa fa-envelope"></i>
                        support@email.com
                    </div>
                    <div class="col-sm-6">
                        <i class="fa fa-phone-alt"></i>
                        +012-345-6789
                    </div>
                </div>
            </div>
        </div>
        <!-- Top bar End -->
        
        <!-- Nav Bar Start -->
        <div class="nav">
            <div class="container-fluid">
                <nav class="navbar navbar-expand-md bg-dark navbar-dark">
                    <a href="#" class="navbar-brand">MENU</a>
                    <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
                        <span class="navbar-toggler-icon"></span>
                    </button>

                    <div class="collapse navbar-collapse justify-content-between" id="navbarCollapse">
                        <div class="navbar-nav mr-auto">
                            <a href="index.html" class="nav-item nav-link active">Home</a>
                            <a href="product-list.html" class="nav-item nav-link">Products</a>
                            <a href="product-detail.html" class="nav-item nav-link">Product Detail</a>
                            <a href="cart.html" class="nav-item nav-link">Cart</a>
                            <a href="checkout.html" class="nav-item nav-link">Checkout</a>
                            <a href="my-account.html" class="nav-item nav-link">My Account</a>
                            <div class="nav-item dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">More Pages</a>
                                <div class="dropdown-menu">
                                    <a href="wishlist.html" class="dropdown-item">Wishlist</a>
                                    <a href="login.html" class="dropdown-item">Login & Register</a>
                                    <a href="contact.html" class="dropdown-item">Contact Us</a>
                                </div>
                            </div>
                        </div>
                        <div class="navbar-nav ml-auto">
                            <div class="nav-item dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">User Account</a>
                                <div class="dropdown-menu">
                                    <a href="#" class="dropdown-item">Login</a>
                                    <a href="#" class="dropdown-item">Register</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
        <!-- Nav Bar End -->      
        
        <!-- Bottom Bar Start -->
        <div class="bottom-bar">
            <div class="container-fluid">
                <div class="row align-items-center">
                    <div class="col-md-3">
                        <div class="logo">
                            <a href="index.html">
                                <img src="img/logo.png" alt="Logo">
                            </a>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="search">
                            <input type="text" placeholder="Search">
                            <button><i class="fa fa-search"></i></button>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="user">
                            <a href="wishlist.html" class="btn wishlist">
                                <i class="fa fa-heart"></i>
                                <span>(0)</span>
                            </a>
                            <a href="cart.html" class="btn cart">
                                <i class="fa fa-shopping-cart"></i>
                                <span>(0)</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="header">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-3">
                        <nav class="navbar bg-light">
                            <ul class="navbar-nav">
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-home"></i>Home</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-shopping-bag"></i>Best Selling</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-plus-square"></i>New Arrivals</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-female"></i>Fashion & Beauty</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-child"></i>Kids & Babies Clothes</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-tshirt"></i>Men & Women Clothes</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-mobile-alt"></i>Gadgets & Accessories</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#"><i class="fa fa-microchip"></i>Electronics & Accessories</a>
                                </li>
                            </ul>
                        </nav>
                    </div>
                    <div class="col-md-6">
                        <div class="header-slider normal-slider">
                            <div class="header-slider-item">
                                <img src="img/slider-1.jpg" alt="Slider Image" />
                                <div class="header-slider-caption">
                                    <p>Some text goes here that describes the image</p>
                                    <a class="btn" href=""><i class="fa fa-shopping-cart"></i>Shop Now</a>
                                </div>
                            </div>
                            <div class="header-slider-item">
                                <img src="img/slider-2.jpg" alt="Slider Image" />
                                <div class="header-slider-caption">
                                    <p>Some text goes here that describes the image</p>
                                    <a class="btn" href=""><i class="fa fa-shopping-cart"></i>Shop Now</a>
                                </div>
                            </div>
                            <div class="header-slider-item">
                                <img src="img/slider-3.jpg" alt="Slider Image" />
                                <div class="header-slider-caption">
                                    <p>Some text goes here that describes the image</p>
                                    <a class="btn" href=""><i class="fa fa-shopping-cart"></i>Shop Now</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="header-img">
                            <div class="img-item">
                                <img src="img/category-1.jpg" />
                                <a class="img-text" href="">
                                    <p>Some text goes here that describes the image</p>
                                </a>
                            </div>
                            <div class="img-item">
                                <img src="img/category-2.jpg" />
                                <a class="img-text" href="">
                                    <p>Some text goes here that describes the image</p>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        

Nah jika HTML sudah mari kita buat CSSnya 

/**********************************/

/********** General CSS ***********/

/**********************************/

body {

    color#353535;

    font-family'Open Sans'sans-serif;

    font-weight400;

    background#f3f6ff;

}



a {

    color#FF6F61;

}



a:hover,

a:active,

a:focus {

    color#353535;

    outlinenone;

    text-decorationnone;

}



h1 {

    font-family'Source Code Pro'monospace;

    font-weight900;

}



h2 {

    font-family'Source Code Pro'monospace;

    font-weight700;

}



@media(min-width992px) {

    .container-fluid {

        padding-right60px;

        padding-left60px;

    }

}





/**********************************/

/******** Back to Top CSS *********/

/**********************************/

.back-to-top {

    positionfixed;

    displaynone;

    background#FF6F61;

    color#ffffff;

    width40px;

    height40px;

    text-aligncenter;

    line-height1;

    font-size16px;

    border-radius4px;

    right15px;

    bottom15px;

    transitionbackground 0.5s;

    z-index11;

}



.back-to-top i {

    padding-top12px;

    color#ffffff;

}





/**********************************/

/********* Form Input CSS *********/

/**********************************/

.form-control,

.custom-select {

    width100%;

    height35px;

    padding0 15px;

    color#999999;

    border1px solid #dddddd;

    margin-bottom15px

}



.form-control:focus,

.custom-select:focus {

    box-shadownone;

    border-color#FF6F61;

}



.custom-radio,

.custom-checkbox {

    margin-bottom15px;

}



.custom-radio .custom-control-label::before,

.custom-checkbox .custom-control-label::before {

    background#dddddd;

    border-color#dddddd;

}



.custom-radio .custom-control-input:checked~.custom-control-label::before,

.custom-checkbox .custom-control-input:checked~.custom-control-label::before {

    color#ffffff;

    background#FF6F61;

    border-color#FF6F61;

    box-shadownone;

}



.btn {

    color#FF6F61;

    background#ffffff;

    border1px solid #FF6F61;

}



.btn:hover,

.btn:active,

.btn:focus {

    color#ffffff;

    background#FF6F61;

    box-shadownone;

}





/**********************************/

/******* Normal Slider CSS ********/

/**********************************/

.normal-slider .slick-prev,

.normal-slider .slick-next {

    width40px;

    height40px;

    z-index1;

    opacity0;

    transition.5s;

    backgroundrgba(25511197.7);

    border-radius4px;

}



.normal-slider .slick-prev {

    left55px;

}



.normal-slider .slick-next {

    right55px;

}



.normal-slider.slick-slider:hover .slick-prev {

    left15px;

    opacity1;

}



.normal-slider.slick-slider:hover .slick-next {

    right15px;

    opacity1;

}



.normal-slider .slick-prev:hover,

.normal-slider .slick-prev:focus,

.normal-slider .slick-next:hover,

.normal-slider .slick-next:focus {

    backgroundrgba(000.7);

}



.normal-slider .slick-prev:hover::before,

.normal-slider .slick-prev:focus::before,

.normal-slider .slick-next:hover::before,

.normal-slider .slick-next:focus::before {

    color#FF6F61;

}



.normal-slider .slick-prev::before,

.normal-slider .slick-next::before {

    font-family"Font Awesome 5 Free";

    font-weight900;

    font-size30px;

    color#ffffff;

}



.normal-slider .slick-prev::before {

    content"\f104";

}



.normal-slider .slick-next::before {

    content"\f105";

}



.normal-slider .slick-dots {

    bottom15px;

}



.normal-slider .slick-dots li button:before {

    color#ffffff;

    font-size15px;

}



.normal-slider .slick-dots li.slick-active button:before {

    color#FF6F61;

}



.slick-dotted.slick-slider {

    margin-bottom0;

}





/**********************************/

/********** Top Bar CSS ***********/

/**********************************/

.top-bar {

    padding3px 0;

    font-size14px;

    color#FF6F61;

    background#000000;

}



.top-bar i {

    margin-right5px;

}



.top-bar .col-sm-6:first-child {

    text-alignleft;

}



.top-bar .col-sm-6:last-child {

    text-alignright;

}



@media (max-width575.98px) {

    .top-bar {

        border-bottom1px solid rgba(255,255,255,.1);

    }

    

    .top-bar .col-sm-6:first-child,

    .top-bar .col-sm-6:last-child {

        text-aligncenter;

    }

}





/**********************************/

/*********** Nav Bar CSS **********/

/**********************************/

.nav {

    positionrelative;

}



@media (min-width992px) {

    .nav .container-fluid {

        padding-left52px;

        padding-right52px;

    }

}



.nav .navbar {

    height100%;

    padding0;

}



.nav .dropdown-menu {

    margin-top0;

    border0;

    border-radius0;

    background#FF6F61;

}



.nav .dropdown-menu a.active {

    color#353535;

    background#f8f9fa;

}



@media (min-width768px) {

    .nav,

    .nav .navbar {

        background#FF6F61 !important;

    }

    

    .nav .navbar-brand {

        displaynone;

    }

    

    .nav .navbar-dark a.nav-link {

        color#ffffff;

        font-size14px;

        text-transformuppercase;

    }

    

    .nav .navbar-dark a.nav-link:hover,

    .nav .navbar-dark a.nav-link.active {

        color#000000;

    }

}



@media (max-width768px) {

    .nav {

        padding5px 0;

    }

    

    .nav,

    .nav .navbar {

        background#000000 !important;

    }

    

    .nav a.nav-link {

        padding5px 0;

    }

    

    .nav .dropdown-menu {

        box-shadownone;

    }

}

/**********************************/
/********* Bottom Bar CSS *********/
/**********************************/
.bottom-bar {
    padding15px 0;
    background#ffffff;
    margin-bottom30px;
}

.bottom-bar .logo {
    text-alignleft;
    overflowhidden;
}

.bottom-bar .logo a img {
    max-height60px;
}

.bottom-bar .search {
    width100%;
}

.bottom-bar .search input[type=text] {
    width100%;
    height40px;
    padding0 15px;
    color#666666;
    border1px solid #FF6F61;
    border-radius4px;
}

.bottom-bar .search button {
    positionabsolute;
    width40px;
    height38px;
    top1px;
    right16px;
    padding0 15px;
    bordernone;
    backgroundnone;
    color#FF6F61;
    border-radius0 2px 2px 0;
}

.bottom-bar .search button:hover {
    background#FF6F61;
    color#ffffff;
}

.bottom-bar .user {
    font-size0;
    text-alignright;
}

.bottom-bar .user .wishlist {
    margin-right15px;
}

.bottom-bar .user .cart i,
.bottom-bar .user .wishlist i {
    color#FF6F61;
}

.bottom-bar .user .cart span,
.bottom-bar .user .wishlist span {
    color#FF6F61;
    font-size15px;
}

.bottom-bar .user .cart:hover i,
.bottom-bar .user .wishlist:hover i,
.bottom-bar .user .cart:hover span,
.bottom-bar .user .wishlist:hover span {
    color#ffffff;
}

@media (min-width768px) {
    .bottom-bar {
        max-height90px;
    }
}

@media (max-width767.98px) {
    .bottom-bar .logo,
    .bottom-bar .search,
    .bottom-bar .user {
        text-aligncenter;
        margin-bottom15px;
    }
    
    .bottom-bar .user {
        margin-bottom0;
    }
}