How TO - Slideshow | CSS HTML Javascript

How TO - Slideshow | CSS HTML Javascript



How TO Create  - Slideshow | CSS HTML Javascript




1.index.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">
<title>Item Product</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Open+Sans">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<link rel="stylesheet" href="styles.css">
<script src="javascript.js"></script>

</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h2>Design <b>Products</b></h2>
                <div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="0">
                <!-- Carousel indicators -->
                <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1"></li>
                    <li data-target="#myCarousel" data-slide-to="2"></li>
                </ol>   
                <!-- Wrapper for carousel items -->
                <div class="carousel-inner">
                    
                    <div class="item carousel-item active"><!-- slid one -->
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://zdnet3.cbsistatic.com/hub/i/2019/08/09/736ad3c3-510c-4b8b-b96f-348df5c28f62/samsung-galaxy-book-s-windows-laptop-notebook.jpg" class="img-responsive img-fluid" alt="">                                   
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Galaxy Book S</h4>                                  
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <p class="item-price"><strike>$500.00</strike> <b>$469.00</b></p>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="http://i.dell.com/sites/csimages/Video_Imagery/all/xps_7590_touch.png" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Dell XPS 2020 </h4>                                 
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <p class="item-price"><strike>$125.00</strike> <b>$123.99</b></p>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>      
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://www.tutorialrepublic.com/examples/images/products/macbook-air.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Macbook Air 2020</h4>                                   
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-half-o"></i></li>
                                            </ul>
                                        </div>
                                        <p class="item-price"><strike>$1899.00</strike> <b>$1649.00</b></p>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>                              
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://www.notebookcheck.net/fileadmin/Notebooks/News/_nc3/Zenbook_france.png" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>ASUS ZenBook 2020</h4>                                  
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <p class="item-price"><strike>$345.00</strike> <b>$240.00</b></p>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                        </div>
                    </div><!-- end slid one -->

                    <div class="item carousel-item"><!-- slid two -->
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://i.ytimg.com/vi/unDxjGO7qKA/maxresdefault.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Apple iPhone 12 Pro</h4>
                                        <p class="item-price"><strike>$389.00</strike> <span>$369.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://www.droidshout.com/wp-content/uploads/2019/11/Samsung-galaxy-s11-live-shots.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>samsung galaxy s11</h4>
                                        <p class="item-price"><strike>$1099.00</strike> <span>$969.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-half-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://www.htxt.co.za/wp-content/uploads/2019/12/huawei-mate-30-pro-rear.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Huawei Pro 2020</h4>
                                        <p class="item-price"><strike>$129.00</strike> <span>$99.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://images-na.ssl-images-amazon.com/images/I/51n0qZMeRWL._SY355_.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Oppo A9 2020 </h4>
                                        <p class="item-price"><strike>$599.00</strike> <span>$569.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>                      
                        </div>
                    </div><!-- end slid two -->

                    <div class="item carousel-item"><!-- slid three -->
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://mxsonyb2c.vteximg.com.br/arquivos/ids/180026-1000-1000/ILCE-7m3k_3.jpg?v=636589433038600000" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Camara Sony 2020</h4>
                                        <p class="item-price"><strike>$369.00</strike> <span>$349.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://www.tutorialrepublic.com/examples/images/products/canon.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Canon DSLR</h4>
                                        <p class="item-price"><strike>$315.00</strike> <span>$250.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://www.ephotozine.com/articles/nikon-coolpix-p520-and-coolpix-l820-21223/images/highres-L820_BL_front34l_on_1359451310.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Nikon Coolpix P520</h4>
                                        <p class="item-price"><strike>$450.00</strike> <span>$418.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-half-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>  
                            <div class="col-sm-3">
                                <div class="thumb-wrapper">
                                    <span class="wish-icon"><i class="fa fa-heart-o"></i></span>
                                    <div class="img-box">
                                        <img src="https://img.pccomponentes.com/articles/6/67366/samsung-wb2100-16mp-negra-4.jpg" class="img-responsive img-fluid" alt="">
                                    </div>
                                    <div class="thumb-content">
                                        <h4>Samsung WB2100</h4>
                                        <p class="item-price"><strike>$350.00</strike> <span>$330.00</span></p>
                                        <div class="star-rating">
                                            <ul class="list-inline">
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star"></i></li>
                                                <li class="list-inline-item"><i class="fa fa-star-o"></i></li>
                                            </ul>
                                        </div>
                                        <a href="#" class="btn btn-primary">Add to Cart</a>
                                    </div>                      
                                </div>
                            </div>
                        </div>
                    </div>
                </div><!-- end slid three -->
                
                <!-- Carousel controls -->
                <a class="carousel-control left carousel-control-prev" href="#myCarousel" data-slide="prev">
                    <i class="fa fa-angle-left"></i>
                </a>
                <a class="carousel-control right carousel-control-next" href="#myCarousel" data-slide="next">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            </div>
            </div>
        </div>
    </div>
</body>
</html>                                                                 


2. styles.css


body {
    background#eef0f1;
    font-family"Open Sans"sans-serif;
}
h2 {
    color#000;
    font-size26px;
    font-weight300;
    text-aligncenter;
    text-transformuppercase;
    positionrelative;
    margin30px 0 60px;
}
h2::after {
    content"";
    width100px;
    positionabsolute;
    margin0 auto;
    height4px;
    border-radius1px;
    background#04eeee;
    left0;
    right0;
    bottom-20px;
}
.carousel {
    margin50px auto;
    padding0 70px;
}
.carousel .item {
    color#747d89;
    min-height325px;
    text-aligncenter;
    overflowhidden;
}
.carousel .thumb-wrapper {
    padding25px 15px;
    background#fff;
    border-radius16px;
    text-aligncenter;
    positionrelative;
    box-shadow0 4px 5px rgba(1412212450.699);
}
.carousel .item .img-box {
    height120px;
    margin-bottom20px;
    width100%;
    positionrelative;
}
.carousel .item img {   
    max-width100%;
    max-height100%;
    displayinline-block;
    positionabsolute;
    bottom0;
    margin0 auto;
    left0;
    right0;
}
.carousel .item h4 {
    font-size18px;
}
.carousel .item h4.carousel .item p.carousel .item ul {
    margin-bottom5px;
}
.carousel .thumb-content .btn {
    color#04eeee;
    font-size11px;
    text-transformuppercase;
    font-weightbold;
    backgroundnone;
    border1px solid #04eeee;
    padding6px 14px;
    margin-top5px;
    line-height16px;
    border-radius20px;
    box-shadow0 4px 5px rgba(1412212450.699);
}
.carousel .thumb-content .btn:hover.carousel .thumb-content .btn:focus {
    color#fff;
    background#04eeee;
    box-shadownone;
    box-shadow0 4px 5px rgba(1412212450.699);
}
.carousel .thumb-content .btn i {
    font-size14px;
    font-weightbold;
    margin-left5px;
}
.carousel .carousel-control {
    height100px;
    width40px;
    background#806c6c36;  
    marginauto 0;
    border-radius1px;
    opacity0.8;
}

.carousel .carousel-control:hover {
    background#04eeee;
}
.carousel .carousel-control i {
    font-size36px;
    positionabsolute;
    top50%;
    displayinline-block;
    margin-19px 0 0 0;
    z-index5;
    left0;
    right0;
    color#fff;
    text-shadownone;
    font-weightbold;
}
.carousel .item-price {
    font-size13px;
    padding2px 0;
}
.carousel .item-price strike {
    opacity0.7;
    margin-right5px;
}
.carousel .carousel-control.left i {
    margin-left-2px;
}
.carousel .carousel-control.right i {
    margin-right-4px;
}
.carousel .carousel-indicators {
    bottom-50px;
}
.carousel-indicators li.carousel-indicators li.active {
    width10px;
    height10px;
    margin4px;
    border-radius50%;
    bordernone;
}
.carousel-indicators li {   
    backgroundrgba(0000.2);
}
.carousel-indicators li.active {    
    backgroundrgba(0000.6);
}
.carousel .wish-icon {
    positionabsolute;
    right10px;
    top10px;
    z-index99;
    cursorpointer;
    font-size16px;
    color#abb0b8;
}
.carousel .wish-icon .fa-heart {
    color#ff0000;
}
.star-rating li {
    padding0;
}
.star-rating i {
    font-size14px;
    color#ff9100;
}



3.javascript.js

$(document).ready(function()
{
    $(".wish-icon i").click(function()
    {
    $(this).toggleClass("fa-heart fa-heart-o");
  });
}); 








Reactions

Post a Comment

0 Comments

close