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.display
div.kbd
	div.grill
	div.keys
		ul.row.one
			li.esc esc
			li F1
			li F2
			li F3
			li F4
			li F5
			li F6
			li F7
			li F8
			li F9
			li F10
			li F11
			li F12
			li 
		ul.row.rest
			li
			li 1
			li 2
			li 3
			li 4
			li 5
			li 6
			li 7
			li 8
			li 9 
			li 0
			li -
			li =
			li.back delete
		ul.row.rest
			li.tab tab
			li Q
			li W
			li E
			li R
			li T
			li Y
			li U
			li I
			li O
			li P
			li [
			li ]
			li \
		ul.row.rest
			li.caps caps lock
			li A
			li S
			li D
			li F
			li G
			li H
			li J
			li K
			li L
			li ;
			li '
			li.return return
		ul.row.rest
			li.shift shift
			li Z
			li X
			li C
			li V
			li B
			li N
			li M
			li ,
			li .
			li /
			li.shift shift
		ul.row.last
			li fn
			li cntrl
			li opt
			li.cmd cmd
			li.space
			li.cmd cmd
			li opt
			li ◀
			li.arw
			li ►
	div.grill
            
          
!
            
              @mixin silverborder {
	box-shadow: 0 0 0 2px silver, 0 0 0 2px #ccc;
}

@mixin centerItem {
	position: absolute;
  left: 0; right: 0; margin-left: auto; margin-right: auto;
  content: '';
}

$border-radius: 12px;
$dp-border-left-right-bottom: 10px solid black;
$dp-border-top: 20px solid black;

ul, li {
	list-style: none;
	margin: 0;
	padding: 0;
}

body, .kbd, .keys, .row, .row *, .one, .rest, .last {
	display: flex;
}

body {
	flex-direction: column;
	font-family: sans-serif;
	width: 100%;
	height: 700px;
	justify-content: center;
	align-items: center;
	background: #f2f2f2;
	perspective: 1600px;
}

.display {
	@include silverborder;
	transform-style: preserve-3d;
	transform: rotatex(-45deg);
	width: 500px;
	height: 300px;
	background: no-repeat bottom url('http://cdn.wccftech.com/wp-content/uploads/2016/11/Color-Splash-Purple.jpg');
	background-size: cover;
	border-top-left-radius: $border-radius;
	border-top-right-radius: $border-radius;
	box-sizing: border-box;
	border-top: $dp-border-top;
	border-left: $dp-border-left-right-bottom;
	border-right: $dp-border-left-right-bottom;
	border-bottom: $dp-border-left-right-bottom;
	position: relative;
}

.display:before {
	@include centerItem;
	bottom: -48px;
	left: -12px;
	width: 500px;
	height: 36px;
	background: #111;
	border-bottom-left-radius: $border-radius;
	border-bottom-right-radius: $border-radius;
	border-left: 2px solid silver;
	border-right: 2px solid silver;
	border-bottom: 2px solid silver;
}

.display:after {
	@include centerItem;
	position: absolute;
	content: 'Macbook Pro';
	font-size: 14px;
	color: #555;
	bottom: -34px;
	left: 42%;
}

.kbd {
  flex-direction: row;
  z-index: 1;
  padding: 30px 5px 0em 5px;
  margin-top: -18px;
  width: 460px;
  height: 295px;
  background: #666 ;
  border-radius: 16px;
  position: relative;
  justify-content: center;
  box-shadow: 0 0 3px rgba(255, 255, 255, .5) inset;
}

.kbd:before, .kbd:after {
	@include centerItem;
}

.kbd::before {
  top: 0;
  width: 340px;
  height: 9px;
  background: #222;
  box-shadow: 0 0 6px rgba(0, 0, 0, .7) inset;
}

.kbd::after {
  bottom: 10px;
  border-radius: 6px;
  border: 1px solid #555;
  width: 200px;
  height: 110px;
  background: #616161;
}

.grill {
  margin-top: 6px;
  width: 22px;
  height: 158px;
  background-image: radial-gradient(black 30%, transparent 0);
  background-size: 2px 2px;
}

.keys {
	flex-direction: column;
  margin: 0 5px 0 5px;
  width: 400px;
  height: 168px;
  box-shadow: 0 0 9px rgba(0,0,0,.3) inset;
  border-radius: 3px;
}

.row {
	flex-direction: row;
	justify-content: space-between;
	padding: 7px 5px 0 5px;
}

.row * {
	color: white;
	background: #111;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 1);
}

.one *, .rest *, .last * {
	justify-content: center;
	align-items: center;
	font-weight: bold;
}

.one * {
  height: 10px;
  width: 22px;
	font-size: 5px;
}

.rest * {
  height: 22px;
  width: 22px;
	font-size: 7px;
}

.last * {
  height: 22px;
  width: 22px;
	font-size: 5px;
}

.arw {
	width: 18px;
}

.cmd {
	width: 28px;
}

.esc, .back, .tab {
	width: 36px;
}

.caps, .return {
  width: 45px;
}

.shift {
  width: 55px;
}

.space {
  width: 140px;
}
            
          
!
999px
Loading ..................

Console