Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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="ufo">
	<div class="lano1"></div>
	<div class="lano2"></div>
	<div class="lano3"></div>
	<div class="lano4"></div>
	<div class="mostovka"></div>
	<div class="podperaX"></div>
	<div class="podperaY"></div>
	<div class="parallelo"></div>
	<div class="paralleloPoschodie"></div>
	<div class="polgulaUp"></div>
	<div class="polgulaDown"></div>
	<table class="okna">
		<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
	</table>

</div>

              
            
!

CSS

              
                @import compass

$w: 520px
$h: 3/4 *$w

$betonColor: #666
$lanoColor: darken($betonColor, 3%)
$mostovkaColor: darken($betonColor, 8%)
$polgulaColor: darken($betonColor, 6%)

$nasobic : 1.3

$wCesta: $w * $nasobic
$hCesta: 0.05*$h * $nasobic
$wParallelo: 0.029*$w * $nasobic
$hParallelo: 0.04*$h * $nasobic

$wPolgulaDown: 0.20*$w * $nasobic
$hPolgulaDown: 0.024*$h * $nasobic
$hOkna: $hPolgulaDown

$stredTanierX: 0.15 * $w
$stredTanierY: 0.2 * $h
$wPolgula: (0.20 * $w) * $nasobic
$hPolgula: (0.03 * $h + $hOkna) * $nasobic

$stredLanaY: $stredTanierY + 0.1*$h
$stredLanaX: $stredTanierX

$wLano1: 0.008 * $w
$wLano2: $wLano1
$wLano3: $wLano2
$wLano4: $wLano3

$hLano1: 1.25 * $h
$hLano2: 0.98 * $h
$hLano3: 0.76 * $h
$hLano4: 0.64 * $h

$wPodpera: 0.03*$w * $nasobic

=rotate( $val: -2deg )
	-webkit-transform: rotate($val)
	-moz-transform: rotate($val)
	-ms-transform: rotate($val)
	-o-transform: rotate($val)
	transform: rotate($val)
=transform-origin($val)
	-webkit-transform-origin: $val
	-moz-transform-origin: $val
	-ms-transform-origin: $val
	transform-origin: $val
=skew($x:0, $y:0)
	-webkit-transform: skew($x + deg, $y + deg) 
	-moz-transform   : skew($x + deg, $y + deg) 
	-o-transform     : skew($x + deg, $y + deg) 
	-ms-transform    : skew($x + deg, $y + deg) 
	transform        : skew($x + deg, $y + deg) 
=border-top-left-radius($r1, $r2)
	-webkit-border-top-left-radius: $r1 $r2
	border-top-left-radius: $r1 $r2
	background-clip: padding-box
=border-top-right-radius($r1, $r2)
	-webkit-border-top-right-radius: $r1 $r2
	border-top-right-radius: $r1 $r2
	background-clip: padding-box
=border-bottom-left-radius($r1, $r2)
	-webkit-border-bottom-left-radius: $r1 $r2
	border-bottom-left-radius: $r1 $r2
	background-clip: padding-box
=border-bottom-right-radius($r1, $r2) 
	-webkit-border-bottom-right-radius: $r1 $r2
	border-bottom-right-radius: $r1 $r2
	background-clip: padding-box

.basic
	width: 0px
	height: 0px
	overflow: hidden
	position: absolute

.ufo
	width: $w
	height: $h
	overflow: hidden
	position: absolute
	.mostovka
		@extend .basic
		width: $wCesta
		height: $hCesta
		left: 0
		top: 0.9*$h
		background: $mostovkaColor
	.podperaX
		@extend .basic
		+rotate(18deg)
		+transform-origin(top)
		width: $wPodpera
		height: $h
		right: $stredTanierX - ($wPodpera)
		top: $stredTanierY
		background: $betonColor
	.podperaY
		@extend .podperaX
		+rotate(16deg)
	.polgulaUp
		@extend .basic
		top: $stredTanierY - $hPolgula
		right: $stredTanierX - ($wPolgula / 2)
		background: $polgulaColor
		width: $wPolgula
		height: $hPolgula
		+border-top-left-radius(40*$wPolgula,10*$wPolgula)
		+border-top-right-radius(40*$wPolgula,10*$wPolgula)
	.polgulaDown
		@extend .basic
		top: $stredTanierY 
		right: $stredTanierX - ($wPolgulaDown / 2)
		background: $polgulaColor
		width: $wPolgulaDown
		height: $hPolgulaDown
		+border-bottom-left-radius(40*$wPolgula,10*$wPolgula)
		+border-bottom-right-radius(40*$wPolgula,10*$wPolgula)
	.parallelo
		@extend .basic
		+skew(18,0)
		width: $wParallelo
		height: $hParallelo 
		top: $stredTanierY - (1.5*$hPolgula)
		right: $stredTanierX  - ($wPolgula / 4)
		background: $betonColor
	.paralleloPoschodie
		@extend .basic
		width: $wParallelo
		height: $hParallelo
		top: $stredTanierY - (1.5*$hPolgula)
		right: $stredTanierX - ($wPolgulaDown / 6)
		background: $betonColor
	.okna
		background: transparent
		@extend .basic
		width: $wPolgulaDown
		height: $hOkna
		top: $stredTanierY - $hOkna
		right: $stredTanierX - ($wPolgulaDown / 2)
		border-top: 0
		margin-top: 0
		padding-top: 0
		tr
			border-top: 0
			margin-top: 0
			padding-top: 0
		td
			background: yellow
			border-top: 0
			margin-top: 0
			padding-top: 0
	.lano1
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano1
		height: $hLano1
		background: $lanoColor
		+rotate(60deg)
	.lano2
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano2
		height: $hLano2
		background: $lanoColor
		+rotate(49deg)
	.lano3
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano3
		height: $hLano3
		background: $lanoColor
		+rotate(37deg)
	.lano4
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano4
		height: $hLano4
		background: $lanoColor
		+rotate(-15deg)

              
            
!

JS

              
                
              
            
!
999px

Console