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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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="rozhlas">
  <div class="antena"></div>
  <div class="budkaA"></div>
  <div class="budkaB"></div>
  <div class="budkaC">Slovenský Rozhlas</div>
  <div class="strecha"></div>
  <div class="pyramida1"></div>
  <div class="pyramida1a"></div>
  <div class="pyramida2"></div>
  <div class="pyramida2a"></div>
  <div class="pyramida3"></div>
  <div class="pyramida3a"></div>
  <div class="pyramida4"></div>
  <div class="pyramida4a"></div>
  <div class="pyramida5"></div>
  <div class="pyramida5a"></div>
  <div class="pyramida6"></div>
  <div class="pyramida6a"></div>
  <div class="pyramida7"></div>
  <div class="pyramida7a"></div>
</div>
              
            
!

CSS

              
                @import compass

@import url(https://fonts.googleapis.com/css?family=Orbitron)

$w: 600px
$h: 3/4 * $w
$pi: 3.14159265359
$_precision: 10
 
@function pow($base, $exp)
	$value: $base
	@if $exp > 1
		@for $i from 2 through $exp
			$value: $value * $base
	@if $exp < 1
		@for $i from 0 through -$exp
			$value: $value / $base
	@return $value

@function fact($num)
	$fact: 1
	@if $num > 0
		@for $i from 1 through $num
			$fact: $fact * $i
	@return $fact

@function _to_unitless_rad($angle)
	@if unit($angle) == "deg"
		$angle: $angle / 180deg * $pi
	@if unit($angle) == "rad"
		$angle: $angle / 1rad
	@return $angle
 
@function sin($angle)
	$a: _to_unitless_rad($angle)
	$sin: $a
	@for $n from 1 through $_precision
		$sin: $sin + (pow(-1, $n) / fact(2 * $n + 1) ) * pow($a, (2 * $n + 1))
	@return $sin
 
@function cos($angle)
	$a: _to_unitless_rad($angle)
	$cos: 1
	@for $n from 1 through $_precision
		$cos: $cos + ( pow(-1,$n) / fact(2*$n) ) * pow($a,2*$n)
	@return $cos

@function tan($angle)
	@return sin($angle) / cos($angle)

$obkladColor: #54403C
$obvodColor: #dedede
$pyramidaColor: #54403C

$wAntena: 0.005*$w
$hAntena: 0.14*$h
$wBudkaA: 0.18*$w
$hBudkaA: 0.16*$h
$wBudkaB: 0.48*$w
$hBudkaB: 0.07*$h
$wBudkaC: 0.62*$w
$hBudkaC: 0.07*$h
$hStrecha: 0.02*$h
$anglePyramide: 52deg

$hPyramida: ($w/2) * tan($anglePyramide)
$wPyramida: $w
$pyramidFloors: 7

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

.rozhlas
	width: $w
	height: $h
	overflow: hidden
	display: block
	position: absolute
	.antena
		@extend .basic
		width: $wAntena
		height: $hAntena
		top: 0
		left: ( $w / 2 ) - ($wAntena / 2)
		background: darken($obkladColor,2%)
	.budkaA
		@extend .basic
		width: $wBudkaA
		height: $hBudkaA
		top: $hAntena
		left: ( $w / 2 ) - ($wBudkaA / 2)
		background: darken($obkladColor, 4%)
	.budkaB
		@extend .basic
		width: $wBudkaB
		height: $hBudkaB
		top: $hAntena + $hBudkaA
		left: ( $w / 2 ) - ($wBudkaB / 2)
		background: darken($obkladColor,5%)
	.budkaC
		@extend .basic
		width: $wBudkaC
		height: $hBudkaC
		top: $hAntena + $hBudkaA + $hBudkaB
		left: ($w/2) - ($wBudkaC/2)
		background: darken( $obkladColor, 6%)
		font-family: 'Orbitron', sans-serif
		color: orange
		font-size: 0.035 * $h
		text-transform: uppercase
		letter-spacing: 0.003 * $w
		text-align: center
		padding-top: 0.03 * $h
	.strecha
		@extend .basic
		width: $wPyramida
		height: $hStrecha
		left: ($w/2) - ($wPyramida/2)
		top: $hAntena + $hBudkaA + $hBudkaB + $hBudkaC
		background: $obvodColor
	
	$b : ( ($h - ($hAntena + $hBudkaA + $hBudkaB + $hBudkaC + $hStrecha) ) / tan($anglePyramide) )
	$bDiff : $b / ($pyramidFloors)
	$hFloor : ($h - ( $hAntena + $hBudkaA + $hBudkaB + $hBudkaC + $hStrecha ) ) / $pyramidFloors
	$hDiffA: 0.02*$h
	$bA : ( ($h - ($hAntena + $hBudkaA + $hBudkaB + $hBudkaC + $hStrecha + $hDiffA) ) / tan($anglePyramide) )
	$bDiffA : $bA / ($pyramidFloors)
	$hFloorA : ($h - ( $hAntena + $hBudkaA + $hBudkaB + $hBudkaC + $hStrecha + $hDiffA) ) / $pyramidFloors

	@for $i from 1 through $pyramidFloors
		.pyramida#{$i}
			@extend .basic
			width: 0
			height: 0
			border-left: (($wPyramida/2) - ((($i - 1)*$bDiff) ) ) solid transparent
			border-right: (($wPyramida/2) - ((($i - 1)*$bDiff) ) ) solid transparent
			border-top: ( $hPyramida - ( ($i - 1) * $hFloor)) solid darken( $pyramidaColor, $i*1%)
			top: $hAntena + $hBudkaA + $hBudkaB + $hBudkaC + $hStrecha + ($i - 1) * $hFloor
			left: ($w/2) - (($wPyramida/ 2) - (($i - 1)*$bDiff) )

              
            
!

JS

              
                
              
            
!
999px

Console