JSFiddle - React, Tailwind, and code Playground
HTML
STRUKTURA HTML KODE (TISTI DEL, KI JE V BODY-JU):
<header>
...
</header>
<nav>
...
</nav>
<aside>
...
</aside>
<section>
<ul class="rslide">
<li><img ...><p class="caption"> ... </p></li> (večkrat tako)
</ul>
</section>
<footer>
...
</footer>
CSS
STRUKTURA CSS KODE ZA GALERIJO:
.rslides {
position: relative;
list-style: none;
overflow: hidden;
height: 554px;
padding: 0;
margin: 0;
}
.rslides li {
-webkit-backface-visibility: hidden;
position: absolute;
display: none;
height: 554px;
left: 0;
top: 0;
}
.rslides li:first-child {
position: relative;
display: block;
float: left;
}
.rslides img {
display: block;
height: auto;
float: left;
height: 554px;
border: 0;
}
.rslides_nav {
position: absolute;
-webkit-tap-highlight-color: rgba(0,0,0,0);
top: 52%;
left: 0;
opacity: 0.7;
z-index: 3;
text-indent: -9999px;
overflow: hidden;
text-decoration: none;
height: 61px;
width: 38px;
background: transparent url("puscice.gif") no-repeat left top;
margin-top: -45px;
}
.rslides_nav:active {
opacity: 1.0;
}
.rslides_nav.next {
left: auto;
background-position: right top;
right: 0;
}
.rslides .caption {
display: block;
position: absolute;
z-index: 2;
text-shadow: none;
color: #fff;
background: #000;
background: rgba(0,0,0, .8);
left: 0;
right: 0;
bottom: 0;
padding: 10px 20px;
margin: 0;
max-width: none;
}
JavaScript
JS KODA ZA GALERIJO:
$(function() {
$(".rslides").responsiveSlides({
auto: false,
nav: true
});
});