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

              
                <strong class="title">scrollbar-gutter: stable 적용</strong>
<div class="wrap">
  <div class="area -normal">
    <strong class="title">스크롤바 없을 경우</strong>
    <ul  class="list">
      <li class="item">리스트1</li>
      <li class="item">리스트2</li>
      <li class="item">리스트3</li>
      <li class="item">리스트4</li>
      <li class="item">리스트5</li>
      <li class="item">리스트6</li>
      <li class="item">리스트7</li>
      <li class="item">리스트8</li>
    </ul>
  </div>
  <div class="area -scroll">
      <strong  class="title">스크롤바 있을 경우</strong>
      <ul  class="list">
      <li class="item">리스트1</li>
      <li class="item">리스트2</li>
      <li class="item">리스트3</li>
      <li class="item">리스트4</li>
      <li class="item">리스트5</li>
      <li class="item">리스트6</li>
      <li class="item">리스트7</li>
      <li class="item">리스트8</li>
    </ul>
  </div>
</div>
              
            
!

CSS

              
                .title {
  display: block;
  font-size: 20px;
  padding: 10px;
  
  .area & {
     text-align: center;
  }
}


.wrap {
  display: flex;
  border: 1px solid #000;
  width: 600px;
  height: 250px;
  margin-top:10px;
}

.area {
  width: 300px;
  border: 1px solid #000;
  box-sizing: border-box;
  scrollbar-gutter: stable;
  
  &.-normal {
    overflow: hidden;
  }

  &.-scroll {
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.list {
  padding: 0;
  margin: 0;
  background-color:lightblue;
}

.item {
  padding:10px;
  list-style:none;
  border-top: 2px solid #000;
}
              
            
!

JS

              
                
              
            
!
999px

Console