<head><linkrel="stylesheet" type="text/css" href="css/style.css">
<title>Projeto 01</title>
<script>
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function currentDiv(n) {
showDivs(slideIndex = n);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("demo");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" w3-white", "");
}
x[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " w3-white";
}
</script>
<body>
<div id="container">
<div class="topo">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Redes Sociais</a></li>
<li><a href="#">Blog</a></li>
</ul>
</div>
<div class="esquerda"></div>
<div class="direita">
<div class="w3-content w3-display-container">
<img class="mySlides" src="img/01.png">
<img class="mySlides" src="img/02.jpg">
<img class="mySlides" src="img/03.jpg">
<div class="w3-center w3-display-bottommiddle" style="width:100%">
<div class="w3-left" onclick="plusDivs(-1)">❮</div>
<div class="w3-right" onclick="plusDivs(1)">❯</div>
<span class="w3-badge demo w3-border" onclick="currentDiv(1)"></span>
<span class="w3-badge demo w3-border" onclick="currentDiv(2)"></span>
<span class="w3-badge demo w3-border" onclick="currentDiv(3)"></span>
</div>
CSS
#container {
background: white;
display: both;
}
.topo {
height: 200px;
background-color: teal;
box-shadow: 0 0 08px;
margin: 10px;
}
.topo p {
color: #000;
}
.topo ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
.topo li {
float: left;
}
.topo li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.topo li a:hover {
background-color: #111;
}
.conteudo {
display: block;
border-radius: 04px;
box-shadow: 0 0px 05px 0;
margin: auto;
padding: 20px;
width: 60%;
height: 600px;
background-color: orange;
float: both;
}
.conteudo p {
color: #000;
}
.esquerda{
width: 15%;
height: 400px;
background-color: ;
border: 1px solid #000;
margin: 30px;
border-radius: 03px;
float: left;
}
.direita {
width: 15%;
height: 400px;
background-color: ;
border: 1px solid #000;
margin: 30px;
border-radius: 03px;
float: right;
}
#rodape p {
text-align: center;
color: black;
font-size: 16px;
}
.mySlides {display:none}
.w3-left, .w3-right, .w3-badge {cursor:pointer}
.w3-badge {height:13px;width:13px;padding:0}
I have little knowledge in the area of development. I only know the basics in Html and CSS (do not know javascript or jquery). But still, I need to create a small slide for a project I'm developing.
- I need to add the images to a small side DIV, which only displays one image and a caption / description just below NOT overlapping the image;
- With Next and Previous button;
- The caption / description needs to be updated next to the image;
- I need to know how to hide the images and make them appear in a certain time;
- I did research but did not get knowledge or understanding about;
- As it is only about Html and CSS, you do not find much on the internet;
- In a book I was reading CSS - from beginner to pro I read about Overflow and animation . But I do not know how to apply them;
- And so far I do not know how to build the framework for it;