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

              
                <h1>Triangle (삼각형) 아이콘</h1>

<h2>:: 기본형</h2>
<i class="icon_triangle" role="img" aria-label="취소"></i>

<h2>:: 예시</h2>
<i class="icon_triangle_ex1 has_bg" role="img" aria-label="아래로 화살표"></i>
<i class="icon_triangle_ex2 has_bg" role="img" aria-label="오른쪽 화살표"></i>

              
            
!

CSS

              
                body {
  font-family: Helvetica,"Apple SD Gothic Neo",sans-serif;
}

// triangle icon SCSS mixin
@mixin iconTriangle($direction: 'up', $width: 20px, $height: 10px, $color: #000, $display: inline-block){
	display: $display;
	width: $width;
	height: $height;

	&:before {
		content: '';
		display: block;

		@if ($direction == 'up'){
			border-bottom: $height solid $color;
			border-left: round($width/2) solid transparent;
			border-right: round($width/2) solid transparent;
		}
		@else if ($direction == 'down'){
			border-top: $height solid $color;
			border-left: round($width/2) solid transparent;
			border-right: round($width/2) solid transparent;
		}
		@else if ($direction == 'left'){
			border-top: round($height/2) solid transparent;
			border-bottom: round($height/2) solid transparent;
			border-right: $width solid $color;
		}
		@else if ($direction == 'right'){
			border-top: round($height/2) solid transparent;
			border-bottom: round($height/2) solid transparent;
			border-left: $width solid $color;
		}
	}
}

.has_bg {
  background-color: pink;
}

// 기본형
.icon_triangle { 
  @include iconTriangle(); 
}

// 예시
.icon_triangle_ex1 { 
  @include iconTriangle($direction: 'down', $width: 30px, $height: 15px, $color: #000, $display: inline-block); 
}

.icon_triangle_ex2 { 
  @include iconTriangle($direction: 'right', $width: 30px, $height: 50px, $color: #f00, $display: inline-block); 
}
              
            
!

JS

              
                
              
            
!
999px

Console