Today we will clone Disney Plus Hotstar using html, css and js.
What is Hotstar –
Disney+ Hotstar is a streaming service with movies, television shows, live sports, and much more:
- Content: Indian and international movies and TV shows as well as Disney+, Pixar, Star Wars, and Marvel content
- Sports: Live sports including Premier League, ICC Women’s T20 Cricket World Cup, and Pro Kabaddi League
- Hotstar Specials: Original content produced by Hotstar
- Languages: Available in the languages like Hindi, Tamil, Telugu, Malayalam.
- Video quality: Video streaming adaptive technology dynamically changes according to bandwidth availability
- Search: Search process of the content is improved so that complexity is less
Disney + Hotstar was launched in 2015 as Hotstar while in 2019 Star India was acquired by the Walt Disney Company, incorporating Hotstar into Disney + to form Disney+Hotstar.
01. HTML Code :-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hotstar_Clone</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="navbar">
<img src="hotstar_logo.png" class=" brand-logo" alt="disney+logo">
<ul class="nav-links">
<li class="nav-items"><a href="">TV</a></li>
<li class="nav-items"><a href="">Movie</a></li>
<li class="nav-items"><a href="">Sports</a></li>
<li class="nav-items"><a href="">Premium</a></li>
</ul>
<div class="right-container">
<input type="text" class="search-box" placeholder="search">
<button class="Subscribe">Search</button>
<a href="#" class="login-btn">Log in</button>
</div>
</nav>
<div class="carousel-container">
<div class="carousel">
</div>
</div>
<div class="video-card-container">
<div class="video-card">
<img src="hotstar_card1.png" class="video-card-image" alt="disney logo">
<Video src="hotstar_video1.mp4" muted loop class="card-video"></Video>
</div>
<div class="video-card">
<img src="hotstar_card2.png" class="video-card-image" alt="Star Wars logo">
<Video src="hotstar_video2.mp4" muted loop class="card-video"></Video>
</div>
<div class="video-card">
<img src="hotstar_card3.png" class="video-card-image" alt="marvel logo">
<Video src="hotstar_video3.mp4" muted loop class="card-video"></Video>
</div>
<div class="video-card">
<img src="hotstar_card4.png" class="video-card-image" alt="geographic logo">
<Video src="hotstar_video4.mp4" muted loop class="card-video"></Video>
</div>
<div class="video-card">
<img src="hotstar_card5.png" class="video-card-image" alt=""pixer logo>
<Video src="hotstar_video5.mp4" muted loop class="card-video"></Video>
</div>
</div>
<h1 class="title"><h1>Superheroes Movie</h1>
<div class="movies-list">
<a href="#"></a>
<button class="pre-btn"><img src="hotstar_pre.png" alt=""></button>
<button class="nxt-btn"><img src="hotstar_next.png" alt=""></button>
<div class="card-container">
<div class="card">
<img src="hotstar_poster1.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Eternals</h2>
<h6 class="des">
Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster2.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Guardians of the Galaxy Vol. 2</h2>
<h6 class="des">
Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster3.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">The Avengers</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster4.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Iron Man 3</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster5.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">The Marvel</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster6.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Shang-chi</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster7.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Doctor Strange 2</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster8.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Avengers: Age of Ultron</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster9.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Captain America: Civil War</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster10.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Doctor Strange</h2>
<h6 class="des">Superheroes unite to battle villains.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
</div>
</div>
<h1 class="title">Horror Shows</h1>
<div class="movies-list">
<button class="pre-btn"><img src="hotstar_pre.png" alt=""></button>
<button class="nxt-btn"><img src="hotstar_next.png" alt=""></button>
<div class="card-container">
<div class="card">
<img src="hotstar_poster11.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">The Past</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster12.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Creature 3D</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster13.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">EZRA</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster14.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Mohini</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster15.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">13B</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster16.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">1920</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster17.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Prey</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster18.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Lift</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster19.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Stree/h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster20.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Laxmi</h2>
<h6 class="des">shock and disgust while evoking our worst hidden fears.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
</div>
</div>
<h1 class="title">Disney Movie</h1>
<div class="movies-list">
<button class="pre-btn"><img src="hotstar_pre.png" alt=""></button>
<button class="nxt-btn"><img src="hotstar_next.png" alt=""></button>
<div class="card-container">
<div class="card">
<img src="hotstar_poster21.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">The Lion King</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster22.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">The Jungle Book</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster23.webp" alt="" class="card-img">
<div class="card-body">Aladdin</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster24.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Moana</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster25.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Frozen</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster26.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Encato</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster27.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Mermaid</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster28.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Pirates Of Caribbean</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster29.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Beauty And The Beast</h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
<div class="card">
<img src="hotstar_poster30.webp" alt="" class="card-img">
<div class="card-body">
<h2 class="name">Maleficent/h2>
<h6 class="des">Animation is an applied art that makes still images appear to move.</h6>
<button class="watchlist-btn">add to watchlist</button>
</div>
</div>
</section>
</div>
</div>
</div>
<div class="last-footer">
<div class="last-footer-texts">
<h3>© 2023 Disney+. All Rights Reserved.</H3>
<div class="last-footer-links">
<a href="#">Terms Of Use</a>
<a href="#">Privacy Policy</a>
<a href="#">FAQ</a>
</div>
</div>
<div class="last-footer-images">
<a href="#"><img src="hotstar_playstore.webp" class="dwn" alt=""></a>
<a href="#"><img src="hotstar_appstore.webp" class="dwn" alt=""></a>
</div>
</div>
<script src="script.js" async></script>
</body>
</html>
02. CSS Code :-
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100%;
background: #0c111b;
position: relative;
font-family: roboto, sans-serif;
}
.navbar {
width: 100%;
height: 80px;
position: fixed;
top: 0;
left: 0;
padding: 0 4%;
background: #0c111b;
z-index: 1;
display: flex;
align-items: center;
}
.brand-logo {
height: 70px;
}
.nav-links {
margin: 10px;
display: flex;
list-style: none;
}
.nav-items a {
text-decoration: none;
margin-left: 20px;
text-transform: capitalize;
color: #fff;
opacity: 0.9;
}
.right-container {
display: block;
margin-left: auto;
}
.search-box {
border: none;
border-bottom: 1px solid #aaa;
background: transparent;
outline: none;
height: 30px;
color: #fff;
width: 250px;
text-transform: capitalize;
font-size: 16px;
font-weight: 500px;
transition: 0.5s;
}
.search-box::placeholder {
color: #aaa;
}
.search-box:focus {
width: 400px;
border-color: #1f80e0;
}
.search-btn {
position: absolute;
right: 0;
top: 0;
height: 30px;
width: 30px;
border: none;
background: none;
outline: none;
cursor: pointer;
}
.Subscribe {
background: #1f80e0;
height: 30px;
padding: 0 20px;
color: #fff;
border-radius: 5px;
border: none;
outline: none;
text-transform: uppercase;
font-weight: 700px;
font-size: 12px;
margin: 0 10px;
}
.login-btn {
color: #fff;
opacity: 0.9;
text-transform: uppercase;
font-size: 15px;
font-weight: 700px;
text-decoration: none;
}
.carousel-container {
position: relative;
width: 100%;
height: 450px;
padding: 20px 0;
overflow-x: hidden;
margin-top: 80px;
}
.carousel {
display: flex;
width: 92%;
height: 100%;
position: relative;
margin: auto;
overflow-x: visible;
scroll-behavior: smooth;
}
.slider {
flex: 0 0 auto;
margin-right: 30px;
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 5px;
width: 100%;
height: 100%;
left: 0;
transition: 1s;
overflow: hidden;
}
.slider img {
width: 70%;
min-height: 100%;
object-fit: cover;
display: block;
margin-left: auto;
}
.slide-content {
position: absolute;
width: 50%;
height: 100%;
z-index: 1;
background: linear-gradient(to right, #030b17 80%, #0c111b00);
color: #fff;
}
.slide-content h1 {
font-size: 40px;
font-weight: 700;
margin-top: 100px;
padding-left: 50px;
font-family: sans-serif;
text-shadow: -6px 6px black;
}
.slide-content p {
font-size: 20px;
font-weight: 500;
padding-left: 50px;
margin-top: 20px;
opacity: 0.8;
font-family: sans-serif;
text-shadow: -6px 6px black;
}
.slide-content button {
background: #1f80e0;
border: none;
outline: none;
color: #fff;
font-size: 15px;
font-weight: 700;
padding: 10px 20px;
border-radius: 5px;
margin-left: 50px;
margin-top: 20px;
cursor: pointer;
text-transform: capitalize;
}
.slide-content button:hover {
background: #1f80e0;
opacity: 0.8;
}
.moive-title {
padding-left: 50px;
text-transform: capitalize;
margin-top: 40px;
position: absolute;
bottom: 20px;
left: 0;
right: 0;
text-align: center;
}
.moive-title h1 {
font-size: 30px;
font-weight: 700;
font-family: sans-serif;
text-shadow: -6px 6px black;
}
.movie-des {
width: 80%;
line-height: 30px;
padding-left: 50px;
margin-top: 30px;
opacity: 0.8;
font-weight: 500;
font-family: sans-serif;
}
.movie-des p {
font-size: 10px;
font-weight: 400;
padding-left: 50px;
margin-top: 20px;
opacity: 0.8;
font-family: sans-serif;
text-shadow: -6px 6px black;
}
.video-card-container {
position: relative;
width: 92%;
margin: auto;
height: 10vw;
display: flex;
margin-bottom: 20px;
justify-content: space-between;
}
.video-card {
position: relative;
min-width: calc(100% / 5 - 10px);
width: calc(100% / 5 - 10px);
height: 100%;
border-radius: 5px;
overflow: hidden;
background-color: #030b17;
}
#play-btn,
.watchlist-btn {
position: relative;
width: 100%;
text-transform: capitalize;
background: none;
border: none;
font-weight: 500;
text-align: right;
color: rgba(255, 255, 255, 0.5);
margin: 5px 0;
cursor: pointer;
padding: 10px 5px;
border-radius: 5px;
}
.card-video,
.video-card-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-video {
position: absolute;
}
.video-card:hover .video-card-image {
display: none;
}
.video-card:hover .card-video {
display: block;
}
.video-card:hover .card-body {
opacity: 1;
}
.card-body {
opacity: 0;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
background: linear-gradient(to bottom, rgba(4, 8, 15, 0), #192133 90%);
padding: 10px;
transition: 0.5s;
}
.title {
color: #fff;
opacity: 0.9;
padding-left: 4%;
text-transform: capitalize;
font-size: 22px;
font-weight: 500;
}
.movies-list-container {
width: 100%;
margin-top: 20px;
}
.movies-list {
width: 100%;
height: 220px;
position: relative;
margin: 10px 0 20px;
overflow-x: hidden;
overflow-y: visible;
scroll-behavior: smooth;
padding-left: 10px;
}
.movies-list::-webkit-scrollbar-track {
background-color: #0c111b;
}
.movies-list::-webkit-scrollbar {
display: none;
}
.card-container {
position: relative;
width: 92%;
padding-left: 10px;
margin: auto;
height: 220px;
display: flex;
margin: 0 auto;
align-items: center;
overflow-x: auto;
overflow-y: visible;
scroll-behavior: smooth;
}
.card-container::-webkit-scrollbar-track {
background-color: #0c111b;
}
.card-container::-webkit-scrollbar {
display: none;
}
.card {
position: relative;
min-width: 150px;
height: 200px;
width: 150px;
border-radius: 5px;
overflow: hidden;
background-color: #030b17;
margin-right: 10px;
transition: 0.5s;
}
.card-img {
width: 100%;
height: 100%;
object-fit: cover;
}
.card:hover {
transform: scale(1.1);
}
.card:hover .card-body {
opacity: 1;
}
.card-body {
opacity: 0;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
background: linear-gradient(to bottom, rgba(4, 8, 15, 0), #192133 90%);
padding: 10px;
transition: 0.5s;
}
.name {
color: #fff;
font-size: 15px;
font-weight: 500;
text-transform: capitalize;
margin-top: 60%;
}
.des {
color: #fff;
opacity: 0.8;
margin: 5px 0;
font-weight: 500;
font-size: 12px;
}
.rating {
color: #fff;
opacity: 0.8;
font-weight: 500;
font-size: 12px;
}
.watchlist-btn {
position: relative;
width: 100%;
text-transform: capitalize;
background: none;
border: none;
font-weight: 500;
text-align: right;
color: rgba(255, 255, 255, 0.5);
margin: 5px 0;
cursor: pointer;
padding: 10px 5px;
border-radius: 5px;
}
.watchlist-btn::before {
content: "";
position: absolute;
top: 0;
left: -5px;
height: 35px;
width: 35px;
background-image: url(hotstar_add.png);
background-size: cover;
transform: scale(0.4);
}
.watchlist-btn:hover {
color: #fff;
background: rgba(255, 255, 255, 0.1);
}
.pre-btn,
.nxt-btn {
position: absolute;
top: 0;
width: 5%;
height: 100%;
z-index: 2;
border: none;
cursor: pointer;
outline: none;
transition: 0.5s;
}
.pre-btn {
left: 0;
background: linear-gradient(to right, #0c111b 0%, #0c111b00);
}
.nxt-btn {
right: 0;
background: linear-gradient(to left, #0c111b 0%, #0c111b00);
}
.pre-btn img,
.nxt-btn img {
width: 15px;
height: 20px;
opacity: 0;
}
.pre-btn:hover img,
.nxt-btn:hover img {
opacity: 1;
}
.pre-btn:hover,
.nxt-btn:hover {
background: linear-gradient(to left, #0c111b 0%, #0c111b80);
}
.pre-btn:active,
.nxt-btn:active {
background: linear-gradient(to left, #0c111b 0%, #0c111b80);
}
.pre-btn:active img,
.nxt-btn:active img {
opacity: 1;
}
@media screen and (max-width: 768px) {
.nav-links {
display: none;
}
.right-container {
margin-left: 0;
}
.search-box {
width: 200px;
}
.carousel-container {
height: 300px;
}
.carousel {
width: 100%;
}
.slider {
margin-right: 10px;
}
.slide-content {
width: 100%;
}
.moive-title {
padding-left: 10px;
margin-top: 50px;
}
.movie-des {
width: 100%;
padding-left: 10px;
margin-top: 20px;
}
.video-card-container {
height: 20vw;
}
.video-card {
min-width: calc(100% / 3 - 10px);
width: calc(100% / 3 - 10px);
}
.movies-list {
height: 200px;
}
.card-container {
width: 100%;
padding-left: 0;
}
.card {
min-width: 100px;
width: 100px;
height: 150px;
margin-right: 5px;
}
.name {
font-size: 12px;
}
.des {
font-size: 10px;
}
.rating {
font-size: 10px;
}
.watchlist-btn {
font-size: 10px;
}
.pre-btn,
.nxt-btn {
width: 10%;
}
.pre-btn img,
.nxt-btn img {
width: 10px;
height: 15px;
}
}
@media screen and (max-width: 500px) {
.carousel-container {
height: 250px;
}
.carousel {
width: 100%;
}
.slider {
margin-right: 10px;
}
.slide-content {
width: 100%;
}
.moive-title {
padding-left: 10px;
margin-top: 50px;
}
.movie-des {
width: 100%;
padding-left: 10px;
margin-top: 20px;
}
.video-card-container {
height: 20vw;
}
.video-card {
min-width: calc(100% / 3 - 10px);
width: calc(100% / 3 - 10px);
}
.movies-list {
height: 200px;
}
.card-container {
width: 100%;
padding-left: 0;
}
.card {
min-width: 100px;
width: 100px;
height: 150px;
margin-right: 5px;
}
.name {
font-size: 12px;
}
.des {
font-size: 10px;
}
.rating {
font-size: 10px;
}
.watchlist-btn {
font-size: 10px;
}
.pre-btn,
.nxt-btn {
width: 10%;
}
.pre-btn img,
.nxt-btn img {
width: 10px;
height: 15px;
}
}
@media screen and (max-width: 400px) {
.carousel-container {
height: 200px;
}
.carousel {
width: 100%;
}
.slider {
margin-right: 10px;
}
.slide-content {
width: 100%;
}
.moive-title {
padding-left: 10px;
margin-top: 50px;
}
.movie-des {
width: 100%;
padding-left: 10px;
margin-top: 20px;
}
.video-card-container {
height: 20vw;
}
.video-card {
min-width: calc(100% / 3 - 10px);
width: calc(100% / 3 - 10px);
}
.movies-list {
height: 200px;
}
.card-container {
width: 100%;
padding-left: 0;
}
.card {
min-width: 100px;
width: 100px;
height: 150px;
margin-right: 5px;
}
.name {
font-size: 12px;
}
.des {
font-size: 10px;
}
.rating {
font-size: 10px;
}
.watchlist-btn {
font-size: 10px;
}
.pre-btn,
.nxt-btn {
width: 10%;
}
.pre-btn img,
.nxt-btn img {
width: 10px;
height: 15px;
}
}
.last-footer {
display: flex;
justify-content: space-between;
width: 100%;
padding: 0 5%;
color: #999999;
font-size: 12px;
margin-bottom: 50px;
}
.dwn {
min-width: 100%;
width: 100px;
height: 100%;
}
.last-footer-links,
.last-footer-images {
display: flex;
gap: 10px;
padding: 10px 0;
}
.intro {
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-right: 4%;
font-size: 15px;
margin-top: 30px;
}
.intro a {
color: #fff;
}
.intro a:hover {
transform: scale(1.1);
}
.intro-links {
display: flex;
gap: 20px;
}
.intro-images {
display: flex;
gap: 20px;
}
.intro-images img {
width: 30px;
height: 30px;
cursor: pointer;
}
.intro-images img:hover {
transform: scale(1.1);
}
.intro-links a {
color: #fff;
text-decoration: none;
}
.intro-links a:hover {
transform: scale(1.1);
}
.intro-links a::after {
content: "";
display: block;
width: 0;
height: 2px;
background: #fff;
transition: width 0.3s;
}
.intro-links a:hover::after {
width: 100%;
transition: width 0.3s;
}
03. JavaScript Code :-
let movies = [
{
name: "loki",
des: "Loki is an American television series created by Michael Waldron for the streaming service Disney.",
image: "hotstar_banner1.png",
},
{
name: "falcon and the winter soldier",
des: "Falcon and the Winter Soldier is an American television series created for the streaming platform Disney+.",
image: "hotstar_banner2.png",
},
{
name: "WandaVision",
des: "WandaVision is an American television series created for the streaming service Disney+",
image: "hotstar_banner3.png",
},
{
name: "Raya and the Last Dragon",
des: "Raya and the Last Dragon is an animated Disney film released in 2021.",
image: "hotstar_banner4.png",
},
{
name: "Luca",
des: "Luca is a Disney-Pixar animated film released in 2021.",
image: "hotstar_banner5.png",
},
];
const carousel = document.querySelector(".carousel");
let sliders = [];
let slideIndex = 0;
const createSlide = () => {
if (slideIndex >= movies.length) {
slideIndex = 0;
}
let slide = document.createElement("div");
let imgElement = document.createElement("img");
let content = document.createElement("div");
let h1 = document.createElement("h1");
let p = document.createElement("p");
imgElement.appendChild(document.createTextNode(""));
h1.appendChild(document.createTextNode(movies[slideIndex].name));
p.appendChild(document.createTextNode(movies[slideIndex].des));
content.appendChild(h1);
content.appendChild(p);
slide.appendChild(content);
slide.appendChild(imgElement);
carousel.appendChild(slide);
imgElement.src = movies[slideIndex].image;
slideIndex++;
slide.className = "slider";
content.className = "slide-content";
h1.className = "movie-title";
p.className = "movie-des";
sliders.push(slide);
if (sliders.length) {
sliders[0].style.marginLeft = `calc(-${100 * (sliders.length - 2)}% - ${
30 * (sliders.length - 2)
}px)`;
}
};
for (let i = 0; i < 3; i++) {
createSlide();
}
setInterval(() => {
createSlide();
}, 3000);
// video cards
const videoCards = document.querySelectorAll(".video-card");
videoCards.forEach((item) => {
item.addEventListener("mouseover", () => {
let video = item.children[1];
video.play();
});
item.addEventListener("mouseleave", () => {
let video = item.children[1];
video.pause();
});
});
let cardContainers = document.querySelectorAll(".card-container");
let preBtns = document.querySelectorAll(".pre-btn");
let nxtBtns = document.querySelectorAll(".nxt-btn");
function scrollLeft(container) {
container.scrollLeft -= container.clientWidth;
}
function scrollRight(container) {
container.scrollLeft += container.clientWidth;
}
preBtns.forEach((preBtn, index) => {
preBtn.addEventListener("click", () => {
scrollLeft(cardContainers[index]);
});
});
nxtBtns.forEach((nxtBtn, index) => {
nxtBtn.addEventListener("click", () => {
scrollRight(cardContainers[index]);
});
});
OutPut :-
Download Ebooks – Click Me
Download Notes – Click Me