123

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              

<h3>Border-top/right/bottom/left</h3>
<div class="wrapper">
	<div class="width100"></div>
	<br>
	<div class="width50"></div>
	<br>
	<div class="width15"></div>
	<br>
	<div class="width0"></div>
	<br>
</div>


<h3>Arrow with empty space</h3>
<p>*Hover on the arrows below, you will see empty space</p>
<div class="wrapper empty-space">
	<div class="arrow-down"></div>
	<br>
	<div class="arrow-left"></div>
	<br>
	<div class="arrow-up"></div>
	<br>
	<div class="arrow-right"></div>
	<br>
</div>

<h3>Arrow without empty space</h3>
<p>*Hover on the arrows below, you will see empty space</p>
<div class="wrapper hover">
	<div class="arrow-down2"></div>
	<br>
	<div class="arrow-left2"></div>
	<br>
	<div class="arrow-up2"></div>
	<br>
	<div class="arrow-right2"></div>
	<br>
</div>

<h3>An equilateral triangle</h3>
<div class="wrapper last">
	<div class="equilateralTriangle"></div>
</div>

            
          
!
            
              * {
	font-family: roboto;
	color: #666;
	text-align: center;
}

h3 {
	margin-top: 150px;
	
	&:first-child {
		margin-top: 50px;
	}
}

.last {
	margin-bottom: 50px;
}

.wrapper {
	display: flex;
  justify-content: center;
  align-items: flex-end;
	
	div {
	  margin: 10px;
	}
}


// Border-top/right/bottom/left

.width100 {
	width: 100px;
	height: 100px;
	background-color: peachpuff;
	
	border-top: 50px solid lightsalmon;
	border-right: 50px solid salmon ;
	border-bottom: 50px solid indianred;
	border-left: 50px solid  salmon;

}

.width50 {
	width: 50px;
	height: 50px;
	background-color: peachpuff;
	
	border-top: 50px solid lightsalmon;
	border-right: 50px solid salmon ;
	border-bottom: 50px solid indianred;
	border-left: 50px solid  salmon;

}

.width15 {
	width: 15px;
	height: 15px;
	background-color: peachpuff;
	
	border-top: 50px solid lightsalmon;
	border-right: 50px solid salmon ;
	border-bottom: 50px solid indianred;
	border-left: 50px solid  salmon;

}

.width0 {
	width: 0;
	height: 0;
	background-color: peachpuff;
	
	border-top: 50px solid lightsalmon;
	border-right: 50px solid salmon ;
	border-bottom: 50px solid indianred;
	border-left: 50px solid  salmon;
}

// Arrow with empty space
.arrow-down {
	width: 0;
	height: 0;
	
	border-top: 50px solid lightsalmon;  //Coloured border
	
	border-right: 50px solid transparent ; 
	border-bottom: 50px solid transparent;
	border-left: 50px solid  transparent;
}

.arrow-left {
	width: 0;
	height: 0;
	
	border-right: 50px solid salmon;  //Coloured border

	border-top: 50px solid transparent;
	border-bottom: 50px solid transparent;
	border-left: 50px solid  transparent;
}

.arrow-up {
	width: 0;
	height: 0;
	
	border-bottom: 50px solid indianred;  //Coloured border

	border-top: 50px solid transparent;
	border-right: 50px solid transparent ; 
	border-left: 50px solid  transparent;
}

.arrow-right {
	width: 0;
	height: 0;
	
	border-left: 50px solid salmon;  //Coloured border

	border-top: 50px solid transparent;
	border-right: 50px solid  transparent; 
	border-bottom: 50px solid transparent;
}


//Arrow without empty space
.arrow-down2 {
	width: 0;
	height: 0;
	
	border-top: 50px solid lightsalmon;  //Coloured border
	border-right: 50px solid transparent ; 
	border-left: 50px solid  transparent;
  // border-bottom none

}

.arrow-left2 {
	width: 0;
	height: 0;
	
	border-top: 50px solid transparent;
	border-right: 50px solid salmon;  //Coloured border
	border-bottom: 50px solid transparent;
	// border-left none
}

.arrow-up2 {
	width: 0;
	height: 0;
	
	border-right: 50px solid transparent ; 
	border-bottom: 50px solid indianred;  //Coloured border
	border-left: 50px solid  transparent;
	// border-top none

}

.arrow-right2 {
	width: 0;
	height: 0;
	
	border-top: 50px solid transparent;
	border-bottom: 50px solid transparent;
	border-left: 50px solid salmon;  //Coloured border
	// border-right none

}

.empty-space {
	div:hover {
		background-color: peachpuff;
	}
}

.hover {
		div:hover {
		background-color: peachpuff;
	}
}


//An EquilateralTriangle
.equilateralTriangle {
	width: 0;
	height: 0;
	
	border-right: 50px solid  transparent; 
	border-left: 50px solid  transparent; 

	border-bottom: 86.60254px solid salmon;  // (border-left-width 50px + border-right-width 50px) * 0.8660254 = 86.60254px  border-bottom-width = EquilateralTriangle height
	
	&:hover {
		background-color: peachpuff;
	}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console