I am currently experimenting with the Materializecss Image Slider. My goal is to have a fixed full-screen background image while the texts and images slide over it.
Initially, I tried setting the background-color of the slider class as transparent, but unfortunately, it did not work as intended.
$(document).ready(function(){
$('.slider').slider();
});
section {
background: url('http://lorempixel.com/580/250/nature/4') center center no-repeat;
background-size: cover;
}
.slider .slides {
background-color: rgba(255,255,255,0);
margin: 0;
height: 400px;
}
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8>
<title>Customizing Materialize Slider</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/materialize.css">
</head>
<body>
<section>
<div class="slider">
<ul class="slides">
<li>
<div class="caption center-align">
<h3>This is our main Tagline!</h3>
<h5 class="light grey-text text-lighten-3">Here's our secondary slogan.</h5>
</div>
</li>
<li>
<div class="caption left-align">
<h3>Left Aligned Caption</h3>
<h5 class="light grey-text text-lighten-3">Here's our secondary slogan.</h5>
</div>
</li>
<li>
<div class="caption right-align">
<h3>Right Aligned Caption</h3>
<h5 class="light grey-text text-lighten-3">Here's our secondary slogan.</h5>
</div>
</li>
<li>
<div class="caption center-align">
<h3>This is our main Tagline!</h3>
<h5 class="light grey-text text-lighten-3">Here's our secondary slogan.</h5>
</div>
</li>
</ul>
</div>
</section>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/js/materialize.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>