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

              
                <div class="container">
			<div class="computer">
				<div class="monitor">
					<div class="monitor-screen">
						<div class="monitor-screen__layer"></div>
						<div class="screen-surface">
							<div class="surface-left">
								<div class="surface-left-top">
									<div
										class="surface-left-top__text left-text"
									></div>
									<div
										class="surface-left-top__text right-text"
									></div>
								</div>
								<div class="surface-left-bottom">
									<div
										class="surface-left-bottom__text left-text"
									></div>
									<div
										class="surface-left-bottom__text right-text"
									></div>
								</div>
							</div>
							<div class="surface-right">
								<div class="surface-right__heart1 heart"></div>
								<div class="surface-right__heart2 heart"></div>
								<div class="surface-right__heart3 heart"></div>
							</div>
						</div>
					</div>
					<div class="monitor__holder1 holder"></div>
					<div class="monitor__holder2 holder"></div>
					<div class="monitor__holder3 holder"></div>
				</div>
				<div class="keyboard">
					<div class="keyboard-left"></div>
					<div class="keyboard-center">
						<div class="keyboard-keys">
							<span class="keyboard-keys__key"></span>
							<span class="keyboard-keys__key"></span>
							<span class="keyboard-keys__key"></span>
							<span class="keyboard-keys__key"></span>
							<span class="keyboard-keys__key"></span>
							<span class="keyboard-keys__key"></span>
						</div>
					</div>
					<div class="keyboard-bottom"></div>
				</div>
				<div class="mouse">
					<div class="mouse__top"></div>
					<div class="mouse__bottom"></div>
				</div>
			</div>
		</div>
              
            
!

CSS

              
                *,
*:after,
*:before {
	box-sizing: border-box;
}

html {
	font-size: 10px;
	overflow: hidden;
	height: 100%;
	@media (max-width: 450px) {
		font-size: 8px;
	}
}

body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	background: #f6ced6;
}
.container {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	& * {
		position: absolute;
		&:after {
			position: absolute;
		}
		&:before {
			position: absolute;
		}
	}

	.computer {
		width: 31.05rem;
		height: 25.3rem;
		display: flex;

		.monitor {
			width: 23rem;
			height: 13.8rem;
			border: 1.15rem solid #e8e7e5;
			border-bottom: 0;
			&:before {
				content: "";
				width: 1.15rem;
				height: calc(50% + 1.15rem);
				background: #e8e7e5;
				top: -1.15rem;
				left: -2.3rem;
			}
			&:after {
				content: "";
				width: 1.15rem;
				height: calc(100% + 1.15rem);
				background: #e8e7e5;
				top: -1.15rem;
				right: -2.3rem;
			}

			.monitor-screen {
				width: 100%;
				height: 100%;
				border: 1.15rem solid #cecece;
				background: #292b2d;
				display: flex;
				align-items: center;
				justify-content: center;

				&:before {
					content: "";
					width: 2.3rem;
					height: 1.15rem;
					background: #e8e7e5;
					bottom: -1.15rem;
					right: -2.3rem;
				}
				&:after {
					content: "";
					width: 1.15rem;
					height: 1.15rem;
					background: #f6ced6;
					bottom: -1.15rem;
					right: -3.45rem;
					z-index: 5;
				}
				&__layer {
					width: 100%;
					height: 100%;
					background: #266d7a;
					visibility: hidden;
					animation: changeScreenColor 3s infinite;
				}
				.screen-surface {
					width: calc(100% - 2.3rem);
					height: calc(100% - 2.3rem);
					display: flex;
					align-items: center;
					> div {
						display: flex;
						height: 100%;
					}
					.surface-left {
						display: flex;
						flex-direction: column;
						width: 9.2rem;
						> div {
							width: 100%;
							height: 50%;
							display: flex;

							> div {
								height: 3.45rem;
							}
						}
						.surface-left-top {
							align-items: flex-start;
							&__text {
								&.left-text {
									width: 4.6rem;
									border: 1.15rem solid #faa3b3;
									border-top: 0;
									left: 0;
									visibility: hidden;
									animation: fadeLetter 3s infinite;
									&:before {
										content: "";
										width: 1.15rem;
										height: 1.15rem;
										background: #266d7a;
										bottom: -1.15rem;
										left: -1.15rem;
									}
									&:after {
										content: "";
										width: 1.15rem;
										height: 1.15rem;
										background: #266d7a;
										bottom: -1.15rem;
										right: -1.15rem;
									}
								}
								&.right-text {
									width: 3.45rem;
									left: 5.75rem;
									border: 1.15rem solid #faa3b3;
									border-right: 0;
									border-bottom: 0;
									visibility: hidden;
									animation: fadeLetter2 3s infinite;
									&:before {
										content: "";
										width: 1.15rem;
										height: 1.15rem;
										background: #266d7a;
										top: -1.15rem;
										left: -1.15rem;
									}
								}
							}
						}
						.surface-left-bottom {
							align-items: flex-end;
							bottom: 0;
							&__text {
								&.left-text {
									width: 3.45rem;
									border: 1.15rem solid #faa3b3;
									left: 0;
									visibility: hidden;
									animation: fadeLetter3 3s infinite;
								}
								&.right-text {
									width: 2.3rem;
									left: 4.6rem;
									background: #faa3b3;
									visibility: hidden;
									animation: fadeLetter4 3s infinite;
									&:before {
										content: "";
										width: 1.15rem;
										height: 1.15rem;
										background: #266d7a;
										box-shadow: 1.15rem 0 0 #faa3b3;
										bottom: 0;
										left: 1.15rem;
									}
									&:after {
										content: "";
										width: 1.15rem;
										height: 1.15rem;
										background: #266d7a;
										box-shadow: 1.15rem 0 0 #faa3b3;
										top: 0;
										left: 1.15rem;
									}
								}
							}
						}
					}
					.surface-right {
						width: calc(100% - 9.2rem);
						display: flex;
						align-items: center;
						justify-content: center;
						right: 0;
						.heart {
							width: 3.45rem;
							height: 3.45rem;
							border: 1.15rem solid #faa3b3;
							border-top: 0;
							visibility: hidden;
							&:before {
								content: "";
								width: 5.75rem;
								height: 1.15rem;
								background: #faa3b3;
								top: 50%;
								left: 50%;
								transform: translate(-50%, 0%);
							}
							&:after {
								content: "";
								width: 1.15rem;
								height: 1.15rem;
								background: #faa3b3;
								bottom: -2.3rem;
								left: 0;
							}
						}
						&__heart1 {
							animation: fadeHeart 3s infinite;
						}
						&__heart2 {
							animation: fadeHeart1 3s infinite;
						}
						&__heart3 {
							animation: fadeHeart2 3s infinite;
						}
					}
				}
			}
			.holder {
				height: 1.15rem;
			}
			&__holder1 {
				width: calc(100% - 3.45rem);
				background: #868a8d;
				top: 100%;
				left: 1.15rem;
			}
			&__holder2 {
				width: 100%;
				background: #e8e7e5;
				bottom: -2.3rem;
				left: 1.15rem;
				&:before {
					content: "";
					width: 1.15rem;
					height: 1.15rem;
					background: #868a8d;
					bottom: 0;
					right: 100%;
				}
			}
			&__holder3 {
				width: calc(100% + 1.15rem);
				background: #cecece;
				bottom: -3.45rem;
				left: 0;
			}
		}
		.keyboard {
			width: 23rem;
			height: 8.05rem;
			bottom: 0;
			display: flex;
			align-items: flex-start;

			.keyboard-left {
				width: 1.15rem;
				height: 3.45rem;
				background: #e8e7e5;
				z-index: 1;
				left: -1.15rem;
				bottom: 0;
			}

			.keyboard-center {
				width: 23rem;
				height: 8.05rem;
				background: #cecece;
				border: 2.3rem solid #e8e7e5;
				border-bottom-width: 1.15rem;
				border-right-width: 3.45rem;
				&:before {
					content: "";
					width: 1.15rem;
					height: 1.15rem;
					background: #f6ced6;
					left: -2.3rem;
					top: -2.3rem;
				}
				&:after {
					content: "";
					width: 1.15rem;
					height: 3.45rem;
					background: #e8e7e5;
					right: -4.6rem;
				}
				.keyboard-keys {
					width: 100%;
					height: 100%;
					&:before {
						content: "";
						width: 1.15rem;
						height: 1.15rem;
						background: #cecece;
						left: -1.15rem;
						bottom: 0;
					}
					&:after {
						content: "";
						width: 1.15rem;
						height: 1.15rem;
						background: #868a8d;
						right: -1.15rem;
						top: 0;
					}
					&__key {
						width: 1.15rem;
						height: 1.15rem;
						background: #868a8d;
						&:nth-child(1) {
							left: 1.15rem;
							&:before {
								content: "";
								width: 1.15rem;
								height: 1.15rem;
								background: #faa3b3;
								top: 0;
								transform: translateX(5.75rem);
								visibility: hidden;
								animation: moveKey 2000ms infinite;
							}
						}
						&:nth-child(2) {
							right: 3.45rem;
						}
						&:nth-child(3) {
							top: 1.15rem;
							left: 4.6rem;
						}
						&:nth-child(4) {
							top: 1.15rem;
							right: 0;
						}
						&:nth-child(5) {
							top: 2.3rem;
							left: 0;
						}
						&:nth-child(6) {
							top: 3.45rem;
							right: 2.3rem;
							&:before {
								content: "";
								width: 1.15rem;
								height: 1.15rem;
								background: #868a8d;
								left: -2.3rem;
							}
						}
					}
				}
			}
			.keyboard-bottom {
				width: 19.55rem;
				height: 1.15rem;
				background: #e8e7e5;
				box-shadow: 1.15rem 1.15rem 0 #c1959d;
				bottom: -1.15rem;
				left: 1.15rem;
				&:before {
					content: "";
					width: 2.3rem;
					height: 100%;
					background: #d1afb5;
					left: -2.3rem;
				}
				&:after {
					content: "";
					width: 2.3rem;
					height: 100%;
					background: #d1afb5;
					right: -2.3rem;
					box-shadow: 0 1.15rem 0 #f6ced6;
				}
			}
		}
		.mouse {
			width: 8.05rem;
			height: 10.35rem;
			right: -1.15rem;
			bottom: 2.3rem;
			&:before {
				content: "";
				width: 1.15rem;
				height: 4.6rem;
				background: #868a8d;
				top: 1.15rem;
				left: -1.15rem;
			}
			&:after {
				content: "";
				width: 2.3rem;
				height: 1.15rem;
				background: #f6ced6;
				top: 0;
				right: 0;
			}
			> div {
				width: 100%;
			}
			&__top {
				background: #e8e7e5;
				height: 6.9rem;
				&:before {
					content: "";
					width: 1.15rem;
					height: 3.45rem;
					background: #cecece;
					bottom: 0;
					left: 0;
				}
				&:after {
					content: "";
					width: 1.15rem;
					height: 3.45rem;
					background: #f6ced6;
					top: 0;
					right: 0;
				}
			}

			&__bottom {
				height: 3.45rem;
				background: #292b2d;
				bottom: 0;
				box-shadow: 0 -1.15rem 0 #cecece;
				&:before {
					content: "";
					width: 1.15rem;
					height: 4.6rem;
					background: #868a8d;
					bottom: 0;
					left: 0;
				}
				&:after {
					content: "";
					width: 1.15rem;
					height: 1.15rem;
					background: #faa3b3;
					box-shadow: -2.3rem 0 0 #868a8d;
					bottom: 0;
					right: 0;
				}
			}
		}
	}
}

@keyframes changeScreenColor {
	0% {
		visibility: hidden;
	}
	10% {
		visibility: hidden;
	}
	100% {
		visibility: visible;
	}
}
@keyframes fadeLetter {
	0% {
		visibility: hidden;
	}
	20% {
		visibility: hidden;
	}
	100% {
		visibility: visible;
	}
}

@keyframes fadeLetter2 {
	0% {
		visibility: hidden;
	}
	30% {
		visibility: hidden;
	}
	100% {
		visibility: visible;
	}
}
@keyframes fadeLetter3 {
	0% {
		visibility: hidden;
	}
	40% {
		visibility: hidden;
	}
	100% {
		visibility: visible;
	}
}

@keyframes fadeLetter4 {
	0% {
		visibility: hidden;
	}
	50% {
		visibility: hidden;
	}
	100% {
		visibility: visible;
	}
}
@keyframes fadeHeart {
	0% {
		visibility: hidden;
	}
	60% {
		visibility: hidden;
	}
	70% {
		visibility: visible;
	}
	75% {
		visibility: hidden;
	}
}
@keyframes fadeHeart1 {
	0% {
		visibility: hidden;
	}
	80% {
		visibility: hidden;
	}
	85% {
		visibility: visible;
	}
	90% {
		visibility: hidden;
	}
}
@keyframes fadeHeart2 {
	0% {
		visibility: hidden;
	}
	95% {
		visibility: hidden;
	}
	100% {
		visibility: visible;
	}
}
@keyframes moveKey {
	0% {
		visibility: hidden;
		transform: translateX(5.75rem);
	}
	55% {
		visibility: hidden;
	}
	60% {
		visibility: visible;
	}
	64% {
		transform: translateX(5.75rem);
	}
	65% {
		transform: translateX(3.45rem);
	}
	75% {
		transform: translateX(3.45rem);
	}
	77.5% {
		transform: translateX(12.65rem);
	}
	85% {
		transform: translateX(12.65rem);
	}
	90% {
		transform: translate(11.5rem, 1.15rem);
	}
	100% {
		visibility: visible;
		transform: translate(11.5rem, 1.15rem);
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console