RealImmortal2004
Coder
How do I take the code below:
And turn it into a carousel with the same layout as the above? I want to have navigation dots at the bottom of the hero banner but overlayed on top of the image. The carousel should also infinitely loop and cross fade to the next slide. Each slide should have the same layout as the code provided. It should also be responsive. I've tried making this as responsive as possible but I can't figure it out.
Code:
<style>
body, html {
height: 100%;
margin: 0;
}
.hero-image {
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://wallpapers.com/images/featured/tom-and-jerry-2f5fbl2k3wwi31aq.jpg");
height: 90%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
@media screen and (max-width: 600px) {
.hero-image {
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://wallpapers.com/images/featured/tom-and-jerry-2f5fbl2k3wwi31aq.jpg");
height: 70%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
}
.hero-text {
text-align: left;
position: absolute;
top: 70%;
left: 30%;
transform: translate(-50%, -50%);
color: white;
}
@media screen and (max-width: 600px) {
.hero-text {
text-align: left;
position: absolute;
top: 70%;
left: 40%;
font-size:0.8em;
transform: translate(-50%, -50%);
color: white;
}
}
@media screen and (max-width: 600px) {
.hero-text button {
font-size:1em;
}
}
.hero-text button {
border: none;
outline: 0;
display: inline-block;
font-weight:600;
padding: 10px 25px;
color: white;
transition:0.3s;
border-radius:4px;
background-color: rgba(255, 255, 255, 0.5);
text-align: center;
cursor: pointer;
}
.size {
font-size:70px;
color:gold;
}
@media screen and (max-width: 600px) {
.size {
font-size:30px;
}
}
.hero-text button:hover {
background-color: rgba(255, 255, 255, 0.6);
transition:0.3s;
color: white;
}
</style>
<link href='https://fonts.googleapis.com/css?family=Luckiest Guy' rel='stylesheet'>
<div class="hero-image">
<div class="hero-text">
<h1 class="size" style="font-family:'Luckiest Guy', sans-serif; -webkit-text-stroke: 2px black; text-shadow:0 5px 8px black">TOM & JERRY</h1>
<p>Forever plotting against one another, Tom and Jerry are up to their usual antics. <br>The cat and mouse pull pranks, gags and get into escapades all<br> around the globe.</p>
<button onclick=" window.open('https://qostream.glitch.me/shorts/cartoons/tom-and-jerry-s1-e1-watch.html','_self')" title="Watch">Watch S1 E1</button>
</div>
</div>