I made a div that has an image inside it and then I made a button. And I want it to be so that when I press the button it switches between multiple images that i'm going to also add.
Here is the HTML for the button and image:
#gallery {
width: 800px;
height: 450px;
position: absolute;
left: 310px;
top: 180px;
padding: 0;
margin: 0;
z-index: -1;
}
#UCL {
position: relative;
width: 100%;
height: 100%;
border-radius: 5px;
}
button {
width: 100px;
height: 60px;
font-family: "Economica";
font-size: 18px;
background-color: #383838;
color: white;
font-weight: bold;
font-size: 23px;
border: 0;
margin-left: 670px;
margin-top: 110px;
border-radius: 12px;
position: absolute;
opacity: 1;
}
button:hover {
background-color: white;
transition: ease 0.7s;
color: black;
}
<button onclick="myFunction()">
Next
</button>
<div id=gallery>
<img id="UCL" src="http://byuinsider.com/wp-
content/uploads/2015/09/Champions-League-Stadium-Football-Wallpapers-
HD.jpg" alt="Stadium">
</div>