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.

            
              .bg
.box
	.phone
		.inside
			i.fa.fa-bolt
			i.fa.fa-cog
			i.fa.fa-picture-o
			i.fa.fa-video-camera
			i.fa.fa-eercast
			i.fa.fa-camera
			i.fa.fa-refresh
		.sound
		.btn_left
		.btn_right
		.btn_bot
            
          
!
            
              $url: url(https://d2lm6fxwu08ot6.cloudfront.net/img-thumbs/960w/JY97JAGWGD.jpg);

$color_1: #fbc2eb; // pink
$color_2: #a6c1ee; // sky
$color_3: #9e9e9e; // gray
$color_4: #f4f4f4; // white

$base: linear-gradient(135deg, $color_1 0%, $color_2 100%);
$bg_btn_1: linear-gradient(135deg, $color_3 30%, $color_4 100%);
$bg_btn_2: $base;

body {
  display:flex;
  justify-content: center;
  align-items: center;
	height: 100vh;
  padding: 0;
  margin: 0;
}

.bg {
  position: absolute;
  width: 100%;
  height: 100vh;
  background: $url top center;
  background-size: cover;
  filter: blur(10px);
  z-index: -1;
}

.phone {
  position: relative;
  width: 27.5vmin;
  height: 0;
  background: $base;
  border-radius: 1vmin;
	border: .2vmin solid $color_2;
	animation: phone_height 1s .1s linear 1 forwards;
	
	@keyframes phone_height {
		100% {
			height: 49vmin;
		}
	}
}

.sound {
	position: absolute;
	top: 5%;
	left: calc(50% - 2.5vmin);
	width: 5vmin;
	height: .6vmin;
	background: linear-gradient(135deg, $color_2, $color_4, $color_2);
	border-radius: 1vmin;
	border: .1vmin solid $color_2;
	
	&::before {
		content: "";
		position: absolute;
		top: -1.3vmin;
		left: 2.2vmin;
		width: .5vmin;
		height: .5vmin;
		background: linear-gradient(135deg, $color_2, $color_4);
		border: .1vmin solid $color_2;
		border-radius: 50%;
	}
	
	&::after {
		content: "";
		position: absolute;
		top: -.25vmin;
		left: -1.8vmin;
		width: .7vmin;
		height: .7vmin;
		background: linear-gradient(135deg, $color_2, $color_4);
		border: .1vmin solid $color_2;
		border-radius: 50%;
	}
}

.inside {
  position: relative;
  top: 10%;
  width: 88%;
  height: 75%;
  background: $url top center;
  background-size: cover;
	border: .1vmin solid $color_2;
  margin: auto;
	
	&::before,
	&::after {
		content: "";
		position: absolute;
		width: 100%;
		height: 11%;
		background: rgba(0, 0, 0, .25);
	}
	
	&::after {
		bottom: 0;
	}
}

.btn_left,
.btn_left::before,
.btn_right {
	position: absolute;
	width: .3vmin;
	height: 3vmin;
	background: $base;
	border: .2vmin solid $color_2;
	border-radius: 20% 0 0 20%;
	opacity: 0;
	animation: show_btn 1s 1.1s linear 1 forwards;
	
	@keyframes show_btn {
		100% {
			opacity: 1;
		}
	}
}

.btn_left {
	top: 7vmin;
	left: -.6vmin;
	
	&::before {
		content: "";
		top: 4vmin;
		right: -.2vmin;
	}
}

.btn_right {
	top: 7vmin;
	right: -.6vmin;
	border-radius: 0 20% 20% 0;
}

.btn_bot {
	position: relative;
	top: 5.7vmin;
	width: 4.5vmin;
	height: 4.5vmin;
	background: $bg_btn_1;
	border-radius: 50%;
	border: .2vmin solid $color_3;
	margin: auto;
	cursor: pointer;
	opacity: 0;
	animation: show_btn 1s 1.1s linear 1 forwards;
	
	@keyframes show_btn {
		100% {
			opacity: 1;
		}
	}
	
	&::before {
		content: "";
		position: absolute;
		top: 12.5%;
		left: 12.5%;
		width: 70%;
		height: 70%;
		background: $bg_btn_2;
		border-radius: 50%;
		border: .2vmin solid $color_3;
	}
}

// icons
.fa {
	position: absolute;
	color: $color_4;
	font-size: 1.9vmin;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
	animation: show_icons 1s 2.2s linear 1 forwards;
	
	@keyframes show_icons {
		100% {
			opacity: .6;
		}
	}
	
	&-bolt,
	&-cog {
		top: 2.2%;
	}
	
	&-bolt,
	&-picture-o {
		left: 3%;
	}
	
	&-cog,
	&-refresh {
		right: 3%;
	}
	
	&-picture-o,
	&-video-camera,
	&-eercast,
	&-camera,
	&-refresh {
		bottom: 2.2%;
	}
	
	&-video-camera {
		left: 25%;
	}
	
	&-eercast {
		right: calc(50% - .95vmin);
	}
	
	&-camera {
		right: 25%;
	}
}
            
          
!
999px
Loading ..................

Console