cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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.

              <!-- Beginning of Slider -->
<div id="slider">

  <!-- Sildes -->
	<img id="one" src="https://cssdeck.com/uploads/media/items/3/3yiC6Yq.jpg" />
	<img id="two" src="https://cssdeck.com/uploads/media/items/4/40Ly3VB.jpg" />
	<img id="three" src="https://cssdeck.com/uploads/media/items/0/00kih8g.jpg" />
	<img id="four" src="https://cssdeck.com/uploads/media/items/2/2rT2vdx.jpg" />
	<img id="five" src="https://cssdeck.com/uploads/media/items/8/8k3N3EL.jpg" />
	<!-- Navigation for the slides -->
			<a href="#one">1</a>
			<a href="#two">2</a>
			<a href="#three">3</a>
			<a href="#four">4</a>
			<a href="#five">5</a>

<!-- End of Slider -->

    background-color: #eee;

#slider {
    max-width: 640px;
    height: 320px;
    margin: 20px auto 50px;
    position: relative;

#slider img {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    border: 8px solid #fff;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    border-radius: 3px;

#slider img:target {
    opacity: 1;
    -webkit-transition: all .5s ease-in-out;
    -moz-transition: all .5s ease-in-out;
    -ms-transition: all .5s ease-in-out;
    -o-transition: all .5s ease-in-out;
    transition: all .5s ease-in-out;

#slider img#five {
    opacity: 1;

#slider img:not(:target), #slider img:target ~ img#five  {
  opacity: 0;

/* Navigation */

#slider ul{
  position: absolute;
  width: 100%;
  bottom: -65px;

#slider ul li {
  display: inline-block;
  margin: 0 .5em;

#slider ul li a{
  margin: 0;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  height: 15px;
  width: 15px;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
  border-radius: 50%;  
  background: #ccc;


#slider ul li a[href="#five"] {
  /* by default set five to be selected */
  background: #777;

#one:target ~ ul li a[href="#one"],
#two:target ~ ul li a[href="#two"],
#three:target ~ ul li a[href="#three"],
#four:target ~ ul li a[href="#four"],
#five:target ~ ul li a[href="#five"] {
  /*when #id is the target set the link to change to selected color*/
  background: #777;

#one:target ~ ul li a[href="#five"],
#two:target ~ ul li a[href="#five"],
#three:target ~ ul li a[href="#five"],
#four:target ~ ul li a[href="#five"]{
  /*set default selected color of five to change to unselected when any other slide is the target  */
   background: #ccc;

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................