Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                Probando
<div id="slider-wrapper">
<div id="slider">
<a href="URL_ENLACE1"><img src="http://lorempixel.com/1200/720/sports/8" /></a>
<a href="URL_ENLACE2"><img src="http://lorempixel.com/1200/720/nature/2" /></a>
<a href="URL_ENLACE3"><img src="http://lorempixel.com/1200/720/city/4" /></a>
</div>
<a href="javascript:void();" class="mas">&rsaquo;</a>
<a href="javascript:void();" class="menos">&lsaquo;</a>
</div>
<div id="content-wrapper">
  <h2>A very simple slider background</h2>
<p>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed rutrum ligula quam, vitae cursus velit porta et. Vivamus sed ullamcorper augue. Proin sem purus, pretium vel tempor a, ornare vitae ligula. Vivamus sed tellus nisi. Pellentesque mattis lorem quis ante laoreet, sit amet vulputate tortor pellentesque. Sed tristique justo nulla, nec fermentum tellus eleifend quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean at pharetra risus. Quisque ipsum diam, ullamcorper eget pulvinar sit amet, vehicula eget velit. Morbi ornare lectus eget ligula accumsan, at luctus neque fermentum. Cras bibendum ipsum condimentum turpis bibendum, id convallis diam rutrum. Fusce at ligula mauris. Integer sit amet dapibus dolor. Donec ac urna eget nisl dapibus varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.
  </p>
  <p>
Nullam vel purus nunc. Duis scelerisque lectus in urna ultricies, fringilla efficitur turpis accumsan. Etiam nec turpis nec massa fringilla tristique eget eget tellus. Cras dictum nunc ex, id tempor turpis fermentum eu. Donec pellentesque odio eget justo accumsan luctus consequat non tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus pulvinar laoreet elit, dignissim aliquam nulla tincidunt nec. Praesent eget nisl tortor. Phasellus ut orci a quam aliquet vestibulum nec tincidunt ante. Etiam non leo vel eros bibendum sollicitudin. Proin dictum erat sit amet ipsum ultricies rhoncus. Quisque hendrerit lorem non libero viverra, at tincidunt sapien interdum.
  </p>
  <img src="http://lorempixel.com/600/300"/>
  <p>
Donec in nisl eu urna convallis bibendum et non enim. Suspendisse pretium pellentesque pulvinar. Phasellus et vulputate arcu. Nulla molestie tortor eros, vitae pretium risus consectetur id. Donec cursus, risus nec fringilla fermentum, neque mi tincidunt leo, sed euismod orci sapien at dolor. Vivamus semper dictum libero, in finibus lectus hendrerit sed. Vivamus vel pharetra ex.
  </p>
  <p>
Nunc quam ante, faucibus in mi ut, ultrices eleifend nulla. Ut molestie ante eu lacus scelerisque ullamcorper. Donec ut congue dui. Aenean imperdiet dictum ante a vestibulum. Phasellus fringilla pharetra eros et sagittis. Nulla porta mi dui, a tristique diam consequat in. Fusce non pretium ligula. Aliquam leo diam, dapibus et felis id, dignissim ultrices justo. Etiam non eros eget ex facilisis dictum.
  </p>
  <p>
Maecenas facilisis consectetur orci at congue. Donec ultricies lacus erat, a sollicitudin erat hendrerit in. Nullam at metus id quam tristique bibendum id a ex. Curabitur fringilla diam volutpat augue semper sodales. Maecenas ullamcorper, risus nec euismod dignissim, eros mi blandit tortor, quis vehicula augue nulla ac orci. Proin condimentum massa turpis, at vehicula dui vulputate sit amet. Morbi lobortis, tortor eget convallis laoreet, ligula eros dictum erat, commodo venenatis dolor dolor at ante.
  </p>
</div>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
   background: #000;
  position: relative;
}
/* Contenedor general */
#slider-wrapper {
position: absolute;
  top: 0;
  left: 0;
width: 100%;
margin: 0;
padding: 0;
font-size: 0;
}
/* Contenedor slider */
#slider { 
position: relative;
width: 100%;
padding-bottom: 66%; /* Aspect ratio */
}
#slider > a {
position:absolute;
top:0;
left:0;
width: 100%;
min-height: 100%;
}
/* Ajuste de las imágenes */
#slider img {
width: 100%;
min-height: 100%;
position: absolute;
margin:0;
padding:0; 
border:0;
}
/* Flechas de navegación */
a.mas, a.menos {
position: absolute;
top: 40%;
left: 100px;
z-index: 100;
width: 30px;
height: 30px;
text-align: center;
line-height: 26px;
font-size: 30px;
color: white;
background: #333;
text-decoration: none;
  border-radius: 50%;
}
a.mas {
  left: 100%;
  margin-left: -140px;
}
#content-wrapper {
  position: relative;
  top: 300px;
  width: 600px;
  max-width: 90%;
  margin: 0 auto 0;
  padding: 30px;
  background: #eee;
  box-sizing: border-box;
}
#content-wrapper img {
  max-width: 100%;
  height: auto;
}
              
            
!

JS

              
                $(function(){
$('#slider a:gt(0)').hide();
var interval = setInterval(changeDiv, 6000);
function changeDiv(){
$('#slider a:first-child').fadeOut(1000).next('a').fadeIn(1000).end().appendTo('#slider');
};
$('.mas').click(function(){
changeDiv();
clearInterval(interval);
interval = setInterval(changeDiv, 8000);
});
$('.menos').click(function(){
$('#slider a:first-child').fadeOut(1000);
$('#slider a:last-child').fadeIn(1000).prependTo('#slider');
clearInterval(interval);
interval = setInterval(changeDiv, 6000);
});
});
              
            
!
999px

Console