cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

              <div id="slider">
<div id="slide-holder">
  <div class="slide"><img src="https://unsplash.it/400/200/?image=934" alt="" /></div>
    <div class="slide"><img src="https://unsplash.it/400/200/?image=1045" alt="" /></div>
    <div class="slide"><img src="https://unsplash.it/400/200/?image=215" alt="" /></div>
              $slide-width: 400px;
$slide-height: 200px;

#slider {
	width: $slide-width;
	height: $slide-height;
	overflow: hidden;
  border: 1px solid #c69;

.slide {
	width: $slide-width;
	height: $slide-height;
	float: left;
	position: relative;

#slide-holder {
  // wide enough to fit all the slides
	width: 400%;
	position: relative;
	left: 0;
	animation: scroller 10s infinite;

// need a step for each slide
@keyframes scroller {
  0% { transform: translateX(0); }
  33% { transform: translateX(-$slide-width); }
  66% { transform: translateX(-$slide-width*2); }
  100% { transform: translateX(0); }

// additional styling
body {
  font-family: sans-serif;

#slider {
  margin: 0 auto;

// in case images break:

.slide:nth-child(1) {
  background: #c69;

.slide:nth-child(2) {
  background: wheat;

.slide:nth-child(3) {
  background: #eee;
Loading ..................