Remove dots
This commit is contained in:
parent
97f5fe973e
commit
0ba6025495
1 changed files with 13 additions and 71 deletions
84
index.html
84
index.html
|
@ -13,43 +13,9 @@ img {vertical-align: middle;}
|
|||
.slideshow-container {
|
||||
position: relative;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Caption text */
|
||||
.text {
|
||||
color: #f2f2f2;
|
||||
font-size: 15px;
|
||||
padding: 8px 12px;
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Number text (1/3 etc) */
|
||||
.numbertext {
|
||||
color: #f2f2f2;
|
||||
font-size: 12px;
|
||||
padding: 8px 12px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* The dots/bullets/indicators */
|
||||
.dot {
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
margin: 0 2px;
|
||||
background-color: #bbb;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
transition: background-color 0.6s ease;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #717171;
|
||||
}
|
||||
|
||||
/* Fading animation */
|
||||
.fade {
|
||||
-webkit-animation-name: fade;
|
||||
|
@ -58,20 +24,15 @@ img {vertical-align: middle;}
|
|||
animation-duration: 1.5s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes fade {
|
||||
from {opacity: .4}
|
||||
to {opacity: 1}
|
||||
}
|
||||
@-webkit-keyframes fade {
|
||||
from {opacity: .4}
|
||||
to {opacity: 1}
|
||||
}
|
||||
|
||||
@keyframes fade {
|
||||
from {opacity: .4}
|
||||
to {opacity: 1}
|
||||
}
|
||||
|
||||
/* On smaller screens, decrease text size */
|
||||
@media only screen and (max-width: 300px) {
|
||||
.text {font-size: 11px}
|
||||
}
|
||||
@keyframes fade {
|
||||
from {opacity: .4}
|
||||
to {opacity: 1}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -79,36 +40,22 @@ img {vertical-align: middle;}
|
|||
<div class="slideshow-container">
|
||||
|
||||
<div class="mySlides fade">
|
||||
<div class="numbertext">1 / 5</div>
|
||||
<img src="images/1.jpg" style="width:auto">
|
||||
<img src="images/1.jpg">
|
||||
</div>
|
||||
<div class="mySlides fade">
|
||||
<div class="numbertext">2 / 5</div>
|
||||
<img src="images/2.jpg" style="width:auto">
|
||||
<img src="images/2.jpg">
|
||||
</div>
|
||||
<div class="mySlides fade">
|
||||
<div class="numbertext">3 / 5</div>
|
||||
<img src="images/3.jpg" style="width:auto">
|
||||
<img src="images/3.jpg">
|
||||
</div>
|
||||
<div class="mySlides fade">
|
||||
<div class="numbertext">4 / 5</div>
|
||||
<img src="images/4.jpg" style="width:auto">
|
||||
<img src="images/4.jpg">
|
||||
</div>
|
||||
<div class="mySlides fade">
|
||||
<div class="numbertext">5 / 5</div>
|
||||
<img src="images/5.jpg" style="width:auto">
|
||||
<img src="images/5.jpg">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div style="text-align:center">
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var slideIndex = 0;
|
||||
|
@ -117,17 +64,12 @@ showSlides();
|
|||
function showSlides() {
|
||||
var i;
|
||||
var slides = document.getElementsByClassName("mySlides");
|
||||
var dots = document.getElementsByClassName("dot");
|
||||
for (i = 0; i < slides.length; i++) {
|
||||
slides[i].style.display = "none";
|
||||
}
|
||||
slideIndex++;
|
||||
if (slideIndex > slides.length) {slideIndex = 1}
|
||||
for (i = 0; i < dots.length; i++) {
|
||||
dots[i].className = dots[i].className.replace(" active", "");
|
||||
}
|
||||
slides[slideIndex-1].style.display = "block";
|
||||
dots[slideIndex-1].className += " active";
|
||||
setTimeout(showSlides, 5000); // Change image every 2 seconds
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue