Put completely anything inside - text, images, inputs, links, buttons.
It's always displayed and not animated by slider.
Simple slider stretched to full width of wrapper. Photos by Gilderic photography.
Please don't use this HTML file as a starter file, create your own and follow steps in basic usage section of documentation
Slider JavaScript initialization code.
jQuery(document).ready(function($) {
$('#full-width-slider').royalSlider({
arrowsNav: true,
loop: false,
keyboardNavEnabled: true,
controlsInside: false,
imageScaleMode: 'fill',
arrowsNavAutoHide: false,
autoScaleSlider: true,
autoScaleSliderWidth: 960,
autoScaleSliderHeight: 350,
controlNavigation: 'bullets',
thumbsFitInViewport: false,
navigateByClick: true,
startSlideId: 0,
autoPlay: false,
transitionType:'move',
globalCaption: false,
deeplinking: {
enabled: true,
change: false
},
/* size of all images http://help.dimsemenov.com/kb/royalslider-jquery-plugin-faq/adding-width-and-height-properties-to-images */
imgWidth: 1400,
imgHeight: 680
});
});
Additional CSS styles for current slider.
#full-width-slider {
width: 100%;
color: #000;
}
.coloredBlock {
padding: 12px;
background: rgba(255,0,0,0.6);
color: #FFF;
width: 200px;
left: 20%;
top: 5%;
}
.infoBlock {
position: absolute;
top: 30px;
right: 30px;
left: auto;
max-width: 25%;
padding-bottom: 0;
background: #FFF;
background: rgba(255, 255, 255, 0.8);
overflow: hidden;
padding: 20px;
}
.infoBlockLeftBlack {
color: #FFF;
background: #000;
background: rgba(0,0,0,0.75);
left: 30px;
right: auto;
}
.infoBlock h4 {
font-size: 20px;
line-height: 1.2;
margin: 0;
padding-bottom: 3px;
}
.infoBlock p {
font-size: 14px;
margin: 4px 0 0;
}
.infoBlock a {
color: #FFF;
text-decoration: underline;
}
.photosBy {
position: absolute;
line-height: 24px;
font-size: 12px;
background: #FFF;
color: #000;
padding: 0px 10px;
position: absolute;
left: 12px;
bottom: 12px;
top: auto;
border-radius: 2px;
z-index: 25;
}
.photosBy a {
color: #000;
}
.fullWidth {
max-width: 1400px;
margin: 0 auto 24px;
}
@media screen and (min-width:960px) and (min-height:660px) {
.heroSlider .rsOverflow,
.royalSlider.heroSlider {
height: 520px !important;
}
}
@media screen and (min-width:960px) and (min-height:1000px) {
.heroSlider .rsOverflow,
.royalSlider.heroSlider {
height: 660px !important;
}
}
@media screen and (min-width: 0px) and (max-width: 800px) {
.royalSlider.heroSlider,
.royalSlider.heroSlider .rsOverflow {
height: 300px !important;
}
.infoBlock {
padding: 10px;
height: auto;
max-height: 100%;
min-width: 40%;
left: 5px;
top: 5px;
right: auto;
font-size: 12px;
}
.infoBlock h3 {
font-size: 14px;
line-height: 17px;
}
}
HTML markup of slider.
<div id="full-width-slider" class="royalSlider heroSlider rsMinW">
<div class="rsContent">
<img class="rsImg" src="../img/full-width/1.jpg" alt="">
<div class="infoBlock infoBlockLeftBlack rsABlock" data-fade-effect="" data-move-offset="10" data-move-effect="bottom" data-speed="200">
<h4>This is an animated block, add any number of them to any type of slide</h4>
<p>Put completely anything inside - text, images, inputs, links, buttons.</p>
</div>
</div>
<div class="rsContent">
<img class="rsImg" src="../img/full-width/2.jpg" alt="">
<div class="infoBlock rsAbsoluteEl" style="color:#000;" data-fade-effect="" data-move-offset="10" data-move-effect="bottom" data-speed="200">
<h4>This is a static HTML block</h4>
<p>It's always displayed and not animated by slider.</p>
</div>
</div>
<div class="rsContent">
<img class="rsImg" src="../img/full-width/3.jpg" alt="">
<div class="infoBlock rsABlock infoBlockLeftBlack" data-fade-effect="" data-move-offset="10" data-move-effect="bottom" data-speed="200">
<h4>You can link to this slide by adding #3 to url.</h4>
<p><a href="http://dimsemenov.com/plugins/royal-slider/gallery-with-deeplinking/">Learn more</a></p>
</div>
</div>
<div class="rsContent">
<img class="rsImg" src="../img/full-width/4.jpg" alt="">
<span class="photosBy rsAbsoluteEl" data-fade-effect="fa;se" data-move-offset="40" data-move-effect="bottom" data-speed="200">Photos by <a href="http://www.flickr.com/photos/gilderic/">Gilderic</a></span>
</div>
</div>
You should include: jQuery, main slider JavaScript file, main slider CSS file, skin CSS file.
It's recommended to get jquery.royalslider.min.js from build tool and jquery.js from its official site. Always use the latest version. Feel free to combine files in one.
Make sure that paths match locations of files.
<script src="../assets/royalslider/jquery-1.8.3.min.js" />
<script src="../assets/royalslider/jquery.royalslider.min.js" />
<link href="../assets/royalslider/royalslider.css" rel="stylesheet">
<link href="../assets/royalslider/skins/minimal-white/rs-minimal-white.css" rel="stylesheet">