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.

            
              <div id="slideshow">

   <div class="slideitem current">
     <img src="http://oac.dodgenet.ca/assets/imgs/main/command.png">
   </div>
   
   <div class="slideitem">
     <img src="http://oac.dodgenet.ca/assets/imgs/main/chaos.png">
   </div>
   
   <div class="slideitem">
     <img src="http://oac.dodgenet.ca/assets/imgs/main/chaos_command.png">
   </div>
   
</div>
            
          
!
            
              html {
	background: #1D1F20;
}

#slideshow {
    margin: 0 auto 0 auto; 
    position: relative; 
    width: 90%;
    padding: 0% 0% 56.25% 1%; /*56.25 is for 16x9 resolution*/
		border-radius:15px;
		background: #1D1F20;
    box-shadow: 0 0 20px #050505;
  box-sizing:border-box;
}

#slideshow > div { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    right: 10px; 
    bottom: 10px; 
}

#slideshow > div > img {
	width:100%;
	height:100%;
			border-radius:20px;
}

#slideshow:hover i, #slideshow:hover .slider-dots{
	opacity: 1;
	}

.slidebtn {
	z-index:99;
	background:transparent;
	outline:none;
	border:none;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
	padding:0 10px 0 10px;
	}

.slidebtn:active,
.slidedtn:focus {
	outline:none;}
	
.slidebtn i {
	color:#FFF;
	font-size:72px;
	opacity: 0.01;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;

	}

.prev {
    position: absolute; 
    top: 10px; 
    left: 10px; 
    bottom: 10px;
}

.next {
    position: absolute; 
    top: 10px; 
    right: 10px; 
    bottom: 10px;
}


.slider-dots {
		opacity: 0.095;
  list-style: none;
  display: inline-block;
  padding-left: 0;
  margin-bottom: 0;
  position:absolute;
  left:50%;
  bottom:3%;
  transform: translate(-50%, 0);
  z-index:99;
  	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;

}

.slider-dots li {
  color: #000;
  display: inline;
  font-size: 48px;
  margin-right: 5px;
  cursor:pointer;
}

.slider-dots li.active-dot {
  color: #fff;
}

/*
JQUERY SLIDER BY JohnRostislavovich - https://codepen.io/JohnRostislavovich

ALL YOU HAVE TO DO:
-copy the whole code html, css & js
-include jquery lib
-change the images
*/
            
          
!
            
              $(document).ready(function(){

$("#slideshow > div:gt(0)").hide();

var buttons = "<button class=\"slidebtn prev\"><i class=\"fa fa-chevron-circle-left\"></i></button><button class=\"slidebtn next\"><i class=\"fa fa-chevron-circle-right\"></i></button\>";

var slidesl = $('.slideitem').length
var d = "<li class=\"dot active-dot\">&bull;</li>";
for (var i = 1; i < slidesl; i++) {
	d = d+"<li class=\"dot\">&bull;</li>";}	
var dots = "<ul class=\"slider-dots\">" + d + "</ul\>";

$("#slideshow").append(dots).append(buttons);
var interval = setInterval(slide, 9500);

function intslide(func) {
	if (func == 'start') { 
 	interval = setInterval(slide, 3500);
	} else {
		clearInterval(interval);		
		}
}

function slide() {
		sact('next', 0, 2000);
}
	
function sact(a, ix, it) {
        var currentSlide = $('.current');
        var nextSlide = currentSlide.next('.slideitem');
        var prevSlide = currentSlide.prev('.slideitem');
		var reqSlide = $('.slideitem').eq(ix);

		var currentDot = $('.active-dot');
    	var nextDot = currentDot.next();
    	var prevDot = currentDot.prev();
		var reqDot = $('.dot').eq(ix);
		
        if (nextSlide.length == 0) {
      		nextDot = $('.dot').first();
            nextSlide = $('.slideitem').first();
            }

        if (prevSlide.length == 0) {
      		prevDot = $('.dot').last();
            prevSlide = $('.slideitem').last();
            }
			
		if (a == 'next') {
			var Slide = nextSlide;
			var Dot = nextDot;
			}
			else if (a == 'prev') {
				var Slide = prevSlide;
				var Dot = prevDot;
				}
				else {
					var Slide = reqSlide;
					var Dot = reqDot;
					}

        currentSlide.fadeOut(it).removeClass('current');
        Slide.fadeIn(it).addClass('current');
		
    	currentDot.removeClass('active-dot');
    	Dot.addClass('active-dot');
}	

$('.next').on('click', function(){
		intslide('stop');						
		sact('next', 0, 400);
		intslide('start');						
	});//next

$('.prev').on('click', function(){
		intslide('stop');						
		sact('prev', 0, 400);
		intslide('start');						
	});//prev

$('.dot').on('click', function(){
		intslide('stop');
		var index  = $(this).index();
		sact('dot', index, 400);
		intslide('start');						
	});//prev
//slideshow

});

/*
JQUERY SLIDER BY JohnRostislavovich - https://codepen.io/JohnRostislavovich

ALL YOU HAVE TO DO:
-copy the whole code html, css & js
-include jquery lib
-change the images
*/
            
          
!
999px
Close

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.

Go PRO

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

Console