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="wall">
	<div class="window-cross-bar">
	</div>
	<div class="window-row">
		<div class="window">
		</div>
		<div class="window">
		</div>
		<div class="window">
		</div>
			<div class="window">
		</div>	
			<div class="window">
		</div>	
			<div class="window">
		</div>	
	</div>
	<div class="cube">
		<div class="cube-tile-row upper">
			<div class="tile orange">
			</div>
			<div class="tile orange">
			</div>
			<div class="tile orange">
			</div>
			<div class="tile orange">
			</div>
		</div>
		<div class="cube-tile-row middle">
			<div class="tile light-gray">
			</div>
			<div class="tile light-gray">
			</div>
			<div class="tile light-gray">
			</div>
			<div class="tile light-gray">
			</div>
		</div>
		<div class="desk">
			<div class="monitor">
				<div class="screen">
				</div>
				<div class="stand">
				</div>
				<div class="base">
				</div>
			</div>
			<div class="desk-leg left">
			</div>
			<div class="cabinet">
				<div class="drawer upper">
					<div class="handle">
					</div>
				</div>
				<div class="drawer lower">
					<div class="handle">
					</div>
				</div>
			</div>
			<div class="desk-leg right">
			</div>
		</div>
	</div>
	<div class="chair">
				<div class="armrest left">
		</div>
		<div class="armrest right">
		</div>
		<div class="chair-stand">
		</div>
		<div class="chair-base">
		<div class="chair-wheel left">
		</div>
		<div class="chair-wheel">
		</div>
		<div class="chair-wheel right">
		</div>
		</div>
	</div>
</div>
            
          
!
            
              $orange: #FFA726;
$light-gray: #E0E0E0;
$dark-gray: #616161;
$light-red: #e57373;
$black: #424242;
$light-blue: #E3F2FD;

* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

body {
	background-color: #90A4AE;
}

.wall {
	background-color: #FFF3E0;
	height: 70vh;
	position: relative;
}

.cube {
	background-color: $dark-gray;
	height: 400px;
	width: 800px;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: auto;
}

.cube-tile-row {
	display: flex;
	margin-top: 5px;
	
	&.upper {
		height: 125px;
	}
	
	&.middle {
		height: 200px;
	}
	
	&.lower {
		height: 60px;
	}
}

.tile {
	display: inline-block;
	flex-basis: 25%;
	height: 100%;
	margin: 0 2px;
	
	&:first-of-type {
		margin-left: 5px;
	}
	
	&:last-of-type {
		margin-right: 5px;
	}
}

.desk {
	background-color: #FFE0B2;
	border: 1px solid darken(#FFE0B2, 15%);
	height: 20px;
	margin: 0 5px;
	position: relative;
	top: -175px;
}

.desk-leg {
	background-color: $light-gray;
	border: 1px solid $dark-gray;
	border-top-color: $light-gray;
	border-bottom-width: 20px;
	border-bottom-color: lighten($dark-gray, 10%);
	height: 220px;
	width: 20px;
	position: absolute;
	top: 19px;
	
	&.left {
		left: 20px;
	}
	
	&.right {
		right: 20px;
	}
}

.cabinet {
	background-color: $dark-gray;
	border: 1px solid lighten($dark-gray, 5%);
	border-top-color: $light-red;
	border-top-width: 10px;
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	height: 160px;
	width: 140px;
	position: absolute;
	top: 79px;
	left: 50px;
	display: flex;
	flex-direction: column;
}

.drawer {
	border: 1px solid lighten($dark-gray, 5%);
	display: inline-block;
	flex-grow: 1;
	margin: 5px 5px 2.5px;
	
	&.upper {
		flex-basis: 33%;
	}
	
	&.lower {
		flex-basis: 66%;
	}
}

.handle {
	background-color: lighten($dark-gray, 15%);
	width: 40px;
	height: 5px;
	margin: 10px auto;
}

.monitor {
	background-color: $black;
	width: 213px;
	height: 120px;
	position: absolute;
	bottom: 42px;
	left: 0;
	right: 0;
	margin: 0 auto;
	padding: 4px;
	border-radius: 2px;
}

.screen {
	display: inline-block;
	box-sizing: border-box;
	cursor: pointer;
	background-color: lighten($black, 7%);
	width: 100%;
	height: 100%;
	border-radius: 1px;
}

.stand {
	background-color: $black;
	width: 20px;
	height: 23px;
	margin: 0 auto;
}

.base {
	background-color: $black;
	width: 60px;
	height: 5px;
	margin: 0 auto;
	margin-top: -5px;
}

.orange {
	background-color: $orange;
}

.light-gray {
	background-color: $light-gray;
}

.window {
	background-color: $light-blue;
	height: 40vh;
	width: 100%;
	border: 0px solid $light-gray;
	border-right-color: $light-gray;
	border-right-width: 20px;
}

.window-row {
	background-color: lighten($dark-gray, 15%);
	display: flex;
	flex-direction: row;
	padding-bottom: 20px;
}

.window-cross-bar {
	background-color: $light-gray;
	height: 15px;
	width: 100%;
	position: absolute;
	top: 60px;
}

.chair {
		background-color: rgba(lighten($dark-gray, 10%), 0.95);
	border: 10px solid lighten($dark-gray, 5%);
	border-bottom-width: 20px;
	border-top-right-radius: 10px;
	border-top-left-radius: 10px;
	border-bottom-right-radius: 5px;
	border-bottom-left-radius: 5px;
	width: 180px;
	height: 210px;
	position: absolute;
	left: 0;
	right: 0;
	margin: 0 auto;
	bottom: 110px;
}

.armrest {
	background-color: lighten($dark-gray, 5%);
	width: 30px;
	height: 15px;
	position: absolute;
	bottom: 60px;
	border-radius: 5px;
	
	&.left {
		left: -20px;
	}
	
	&.right {
		right: -20px;
	}
}

.chair-stand {
	background-color: lighten($dark-gray, 2%);
	width: 15px;
	height: 80px;
	position: absolute;
	bottom: -100px;
	left: 0;
		right: 0;
	margin: 0 auto;
}

.chair-base {
	background-color: lighten($dark-gray, 2%);
	height: 15px;
	width: 160px;
	position: absolute;
	left: 0;
	right: 0;
	margin: 0 auto;
	bottom: -115px;
}

.chair-wheel {
	background-color: $black;
	height: 15px;
	width: 10px;
	position: absolute;
	bottom: -15px;
	left: 0;
	right: 0;
	margin: 0 auto;
	
	&.left {
		margin: 0;
		left: 5px;
	}
	
	&.right {
		right: -140px;
	}
}
            
          
!
            
              $('.screen').click(function() {
	if( $(".screen").css('background-color') === 'rgb(84, 84, 84)') {
  $('.screen').css('background-color', '#B3E5FC');
	} else {
		$('.screen').css('background-color', '#545454');
	}
});

            
          
!
999px
Loading ..................

Console