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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.8.0/slick.min.js"></script>

<div class="iphone">
  <div class="border">
    <div class="top-left"></div>
    <div class="top-right"></div>
    <div class="bottom-left"></div>
    <div class="bottom-right"></div>
    <div class="top"></div>
    <div class="bottom"></div>
    <div class="left"></div>
    <div class="right"></div>
  </div>
  <div class="mute aside-btn"></div>
  <div class="volume-plus aside-btn"></div>
  <div class="volume-minus aside-btn"></div>
  <div class="block-button aside-btn"></div>
  <div class="front-body">
    <div class="front-cam"></div>
    <div class="speaker"></div>
    <div class="home-button"></div>
    <div class="screen">
      <div class="content" id="Background">
        <div class="showBottomPanel"></div>
        <div class="camera"></div>
      </div>
    </div>
  </div>
</div>



              
            
!

CSS

              
                body{
	//background-color: #FF9653;
	background-image: url('https://raw.githubusercontent.com/SlavaZuryanov/CFFCP/master/table_background_41_photos_designs_in_table_background.jpg');
	background-size: cover;
	font-size: 150px;
}

@import 'https://fonts.googleapis.com/css?family=Roboto:100';

.iphone{
	$border-from: #a1a2a8;
	$border-to: #6e6f75;
	$button-from: #66656f;
	$button-to: #c5c8cc;
	
	transition: transform .5s;
	position: absolute;
	margin: auto;
	top: 0;bottom: 0;left: 0;right: 0;
	width: 3.16em;
	height: 6.32em;
	box-sizing: border-box;
	box-shadow: -.3em .1em .4em .05em rgba(0,0,0,0.75);
	border-radius: .4em;

	.front-body{
	position: absolute;
	margin: auto;
	top: 0;bottom: 0;left: 0;right: 0;
	background-color: #000000;
	background-image: (linear-gradient(top, #080808 0%, #000000 100%));
	width: 3.06em;
	height: 6.22em;
	border-radius: .36em;
	overflow: hidden;
		
	&:after{
		content: "";
		position: absolute;
		margin: auto;
		top: -1em;
		left: 1.83em;
		width: 5em;
		height: 4em;
		background: linear-gradient(to bottom, rgba(255,255,255,.3) 0%,rgba(255,255,255,0) 100%);
		transform: rotate(-17deg);
	}	
}

	.border{
		position: absolute;
		margin: auto;
		top: 0;bottom: 0;left: 0;right: 0;
		width: 3.16em;
		height: 6.32em;
		border-radius: .4em;
		
		.top{
			position: absolute;
			top: 0;
			right: 0;
			left: 0;
			margin: auto;
			width: 2.35em;
			height: .1em;
			background-image: (linear-gradient(to top, $border-from 0%, $border-from 50%, $border-to 100%));
		}
		.bottom{
			position: absolute;
			bottom: 0;
			right: 0;
			left: 0;
			margin: auto;
			width: 2.35em;
			height: .1em;
			background-image: (linear-gradient(to bottom, $border-from 0%, $border-from 50%, $border-to 100%));
		}
		.left{
			position: absolute;
			left: 0;
			top: 0;
			bottom: 0;
			margin: auto;
			width: .1em;
			height: 5.5em;
			background-image: (linear-gradient(to left, $border-from 0%, $border-from 50%, $border-to 100%));
		}
		.right{
			position: absolute;
			right: 0;
			top: 0;
			bottom: 0;
			margin: auto;
			width: .1em;
			height: 5.5em;
			background-image: (linear-gradient(to right, $border-from 0%, $border-from 50%, $border-to 100%));
		}
		.top-left,
		.top-right,
		.bottom-left,
		.bottom-right{
			position: absolute;
			border-radius: 50%;
			width: .76em;
			height: .76em;
			background: radial-gradient(ellipse at center, #a7a9af 0%,#a7a9af 62%,#66676e 70%,#66676e 100%);
		}
		.top-left{
			top: 0;
			left: 0;
		}
		.top-right{
			top: 0;
			right: 0;
		}
		.bottom-left{
			bottom: 0;
			left: 0;
		}
		.bottom-right{
			bottom: 0;
			right: 0;
		}
}

	.speaker{
		background-color: #3f3f40;
		width: .43em;
		height: .05em;
		border-radius: .025em;
		position: absolute;
		left: 0;right: 0;top: .35em;
		margin: auto;
		z-index: 1;
		&:before{
			content: "";
			position: absolute;
			left: 0;right: 0;top: 0;bottom: 0;
			margin: auto;
			background-color: #3f3f40;
			box-shadow: 0 -.003em .005em .005em rgba(0,0,0,.25);
			width: .3em;
			height: 0;
		}
}

	.front-cam{
		width: .12em;
		height: .12em;
		background-image: (linear-gradient(right bottom, #767676 0%, #222222 100%));
		border-radius: 50%;
		position: absolute;
		top: .31em;
		left: 1em;
		margin: auto;
		&:before, &:after{
			content: "";
			border-radius: 50%;
			position: absolute;
			left: 0;right: 0;top: 0;bottom: 0;
			margin: auto;
			border-radius: 50%;
		}
		&:before{
			width: .06em;
			height: .06em;
			background-image: (linear-gradient(right bottom, #0d1b40 0%, #1b3267 100%));
			box-shadow: .01em .01em .005em rgba(0,0,0,.3);
		}
		&:after{
			width: .03em;
			height: .03em;
			opacity: .3;
			border-color: transparent;
			border-top: 1px solid #ffffff;
		}
}

	.screen{
		position: absolute;
		width: 2.7em;
		height: 4.8em;
		//background-color: #111111;
		background-image: url('https://raw.githubusercontent.com/SlavaZuryanov/CFFCP/master/Night-Fall-at-Lake-Aurora-iphone-6-wallpaper-ilikewallpaper_com.jpg');
		background-size: cover;
		margin: auto;
		left: 0;right: 0;top: 0;bottom: 0;
		font-family: 'Roboto', sans-serif;
		color: #ffffff;
		
		.content{
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 2;
			
			.operator, .battery{
				font-size: .12em;
			}
			
			.operator{
				margin-top: .2em;
				margin-left: .4em;
				float: left;
				
				.name{
					vertical-align: middle;
					position: relative;
					display: inline-block;
				}
				
				.level{
					vertical-align: middle;
					position: relative;
					display: inline-block;
					
					&-item{
						width: .4em;
						height: .4em;
						background-color: #ffffff;
						border-radius: 50%;
						display: inline-block;
						border: 1px solid #ffffff;
						&:nth-child(3), &:nth-child(4), &:nth-child(5){
							background-color: transparent;
						}
					}
				
				}
			}
			
			.battery{
				margin-top: .2em;
				margin-right: .5em;
				float: right;
				
				.percentage, .level{
					display: inline-block;
					position: relative;
					vertical-align: middle;
				}
				
				.level{
					width: 1.6em;
					height: .74em;
					background-color: transparent;
					border: 1px solid #ffffff;
					border-radius: .15em;
					margin-left: .1em;
					
					&:before, &:after{
						content: "";
						background-color: #ffffff;
						position: absolute;
						top: 0; bottom: 0;
						margin: auto;
					}
					
					&:before{
						width: .68em;
						height: .64em;
						left: .08em;
						border-top-left-radius: .1em;
						border-bottom-left-radius: .1em;
					}
					
					&:after{
						width: .1em;
						height: .35em;
						right: -.2em;
						border-top-right-radius: .4em;
						border-bottom-right-radius: .4em;
					}
					
				}
				
			}
			
			.time{
				text-align: center;
				font-size: .6em;
				margin-top: .8em;
			}
			
			.date{
				text-align: center;
				font-size: .15em;
				margin-top: 0;
			}
			
			.slideToUnlock{
				position: absolute;
				left: 53%;
				transform: translateX(-50%);
				margin: auto;
				font-size: .15em;
				text-align: center;
				bottom: 2em;
				opacity: .5;
				
				.arrow{
					position: absolute;
					left: -1.6em;
					top: 0;
					bottom: 0;
					margin: auto;
					height: 1.4em;
					animation: slideToUnlock-arrow 1s linear infinite;
					&:before, &:after{
						content: "";
						background-color: #ffffff;
						width: .1em;
						height: .81em;
						position: absolute;
						right: 0;
					}
					&:before{
						top: 0;
						transform: rotate(-40deg);
					}
					&:after{
						bottom: 0;
						transform: rotate(40deg);
					}
				}
				
			}
			
		}
		
	}

	.home-button{
		position: absolute;
		width: .44em;
		height: .44em;
		background-image: (linear-gradient(bottom, #303030 0%, #303030 10%, #7a7a7a 30%, #7a7a7a 40%, #303030 50%, #303030 100%));
		border-radius: 50%;
		left: 0;right: 0;
		bottom: .14em;
		margin: auto;

		&:before{
			content: "";
			position: absolute;
			top: .02em;
			left: .02em;
			border-radius: 50%;
			width: .4em;
			height: .4em;
			background-color: #000000;
		}

}

	.aside-btn{
		position: absolute;
		height: .5em;
		width: .03em;
		background-image: (linear-gradient(to left, $button-from 0%, $button-from 30%, $button-to 60%));
	}

	.block-button{
		top: 1.4em;
		right: -.03em;
		border-top-right-radius: .8em;
		border-bottom-right-radius: .8em;
		background-image: (linear-gradient(to right, $button-from 0%, $button-from 30%, $button-to 60%));
}

	.mute{
		top: .73em;
		left: -.03em;
		height: .25em;
		border-top-left-radius: .8em;
		border-bottom-left-radius: .8em;
}

	.volume-plus, .volume-minus{
		top: 1.4em;
		left: -.03em;
		border-top-left-radius: .8em;
		border-bottom-left-radius: .8em;
}

	.volume-minus{
		top: 2.1em;
}
	
	@keyframes slideToUnlock-arrow{
		0%{
			transform: translateX(-.2em);
		}
		50%{
			transform: translateX(.2em);
		}
		100%{
			transform: translateX(-.2em);
		}
	}
	
}

#Background {
  background-size: cover;
}

.image-0 {
  background-image: url('https://images.unsplash.com/photo-1511125357779-27038c647d9d?auto=format&fit=crop&w=1951&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D');
}

.image-1 {
  background-image: url('https://images.unsplash.com/photo-1508288155660-625e378b3fc9?auto=format&fit=crop&w=1950&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D');
}

              
            
!

JS

              
                $(document).ready(function(){
  var seconds = 2000;
  var step = 0;
  var limit = 0;

  $("#Background").addClass("image-"+step).fadeIn(500);

  setInterval(function(){
    $("#Background").fadeOut(500,function(){
       $(this).removeClass("image-"+step);
       step = (step > limit) ? 0 : step + 1;
      $("#Background").addClass("image-"+step).fadeIn(500);
    });
  },seconds);
});
              
            
!
999px

Console