Carousel PHP
Carousel PHP
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<title>Kodekreasi.com : Membuat Slider dengan Bootstrap 4</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</div>
<div class="carousel-item">
<img class="d-block w-100"
src="https://picsum.photos/id/1/1080/500" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-100"
src="https://picsum.photos/id/2/1080/500" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators"
role="button" data-slide="prev">
<div class="nav-icon">
<span class="carousel-control-prev-icon"
aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</div>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators"
role="button" data-slide="next">
<div class="nav-icon">
<span class="carousel-control-next-icon"
aria-hidden="true"></span>
<span class="sr-only">Next</span>
</div>
</a>
</div>
</div>
</body>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.carousel-item img{
opacity: 0.6;
}
.nav-icon{
background: #1b1b1b;
width: 3.8rem;
height: 3.8rem;
border-radius: 50%;
border: 0;
opacity: 0.7;
text-shadow: none;
color: #fff;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
}
.nav-icon:hover{
background-color: #000;
opacity: 1.0;
transition: all ease 0.3s;
color: #fff;
}
.carousel-indicators li{
border-radius: 50%;
width: .8rem;
height: .8rem;
background: transparent;
border: solid 2px #1b1b1b;
}