cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

  <li>flex container 내부의 free space 값 계산 편의를 위해 모든 flex item 박스에 <b>width:0</b> 설정.</li>
  <li>따라서 아래 예제 flex container 내부의 free space 값은 현재 모두 <b>300px</b>으로 동일하다.</li>
  <li>붉은색으로 강조한 숫자 '<strong>0</strong>, <strong>3</strong>, <strong>4</strong>'는 flex container 내부 팽창지수(flex-grow)의 총 합이다.</li>
  <li>팽창지수의 총 합은 실제 DOM에 적용된 flex-grow 값의 총 합이다.</li>
  <li>박스 기본 크기 + ( free space / 팽창지수 총 합 ) * flex-grow 값 = flex item 크기.</li>

<h2>.z.a>*{flex-grow:0} // 팽창하지 않음. 0+(300/<strong>0</strong>)*1=0</h2>
<div class="a z">

<h2>.z.b>*{flex-grow:1} // 균등 팽창. 0+(300/<strong>3</strong>)*1=100</h2>
<div class="b z">

  .z.c>:first-child{flex-grow:2} // 0+(300/<strong>4</strong>)*2=150<br>
  .z.c>:first-child~*{flex-grow:1} // 0+(300/<strong>4</strong>)*1=75
<div class="c z">
              .z{display:flex;width:300px;height:50px;background:silver;color:white;outline:5px solid black;margin-bottom:2em;text-align:center;}



Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................