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 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.

Quick-add: + add another resource

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.

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 class="container">
  <div class="image-area">
    <div class="overlay"></div>
    <div class="item first">
    <div class="item second">
    <div class="item third">
  <div class="dots"></div>
              .container {
	width: 400px;
	height: 300px;
	position: relative;
	margin: 50px auto;
	/*Set the perspective on the container*/
	perspective: 800;
.container .image-area {
	height: 300px;
	width: 400px;
	opacity: 1;
	/*Rotate the secondary container*/
  transform-style: preserve-3d;
	transform: rotateX(0deg);
	transition: all 1s ease;
.container .image-area.transition {
	opacity: 0.8;
.container .item {
	position: absolute;
	top: 0;
	left: 0;
  height: 300px;
	width: 400px;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
.container .item.first {
	transform: rotateX(0deg) translateZ(150px);
  background-image: url('http://assets.worldwildlife.org/photos/2842/images/hero_small/shutterstock_12730534.jpg?1352150501');
.container .item.second {
  transform: rotateX(-90deg) translateZ(150px);
  background-image: url('http://blogs-images.forbes.com/juliewilcox/files/2012/10/fall-leaves-tree.jpg');
.container .item.third {
  transform: rotateX(-180deg) translateZ(150px);
  background-image: url('https://1.bp.blogspot.com/_RAlP3BmEW1Q/TQX5iLmaRxI/AAAAAAAACPo/rlWEYeLOY74/s1600/The-best-top-winter-desktop-wallpapers-7.jpg');
.dot {
	height: 20px;
	width: 20px;
	margin-top: 50px;
	margin-right: 1em;
	border-radius: 50%;
	background-color: black;
	display: inline-block;
	opacity: 0.5;
.dot:hover {
	cursor: pointer;
.dot.current {
	opacity: 1;
              $(function() {
	function createDots(cb) {
		var $slides = $('.image-area .item');
		var slideLength = $slides.length;
		var dotTemp = '<div class="dot"></div>';
		var html = '';
		var $dotContainer = $('.dots');
		for (var i = 0; i < slideLength; i++) {
			html += dotTemp;
	function rotateSlider() {
		var $container = $('.container .image-area');
		var $dot = $('.dots .dot');
		$dot.on('click', function() {
			var index = $dot.index($(this));
			$('.dots .dot').removeClass('current');
			$container.css('transform','rotateX(' + (index * 90) +'deg)');
			$container.on('transitionend', function() {
	createDots(function() {
Loading ..................