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.

              <div id="main">
  <div class="box-wrapper">
    <h2>overflow: auto;</h2>
    <div id="auto" class="box"></div>
  <div class="box-wrapper">
   <h2>overflow: scroll;</h2>
   <div id="scroll" class="box"></div>
  <div class="box-wrapper">
    <h2>overflow: hidden;</h2>
    <div id="hidden" class="box"></div>
   <div class="box-wrapper">
    <h2>overflow: visible;</h2>
    <div id="visible" class="box"></div>
              * {
 font-family: 'Noto Sans KR', sans-serif;
 box-sizing: border-box;
 line-height: 1.7em;
 color: #333;
 background-color: khaki;

#main {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 min-width: 300px;

.box-wrapper {
 margin: 20px;

.box {
 width: 300px;
 height: 300px;
 padding: 15px;
 background-color: lightgray;

#auto {
 overflow: auto;

#scroll {
 overflow: scroll;

#hidden {
 overflow: hidden;

#visible {
 overflow: visible;

::-webkit-scrollbar {
    -webkit-appearance: none;

::-webkit-scrollbar:vertical {
    width: 12px;

::-webkit-scrollbar:horizontal {
    height: 12px;

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .4);
    border-radius: 10px;
    border: 2px solid #ffffff;

::-webkit-scrollbar-track {
    background-color: #ffffff;
              const text = `overflow CSS 속성은 그것의 블록 레벨 컨테이너(block-level container)보다 내용(content)이 너무 클 때(즉, 내용을 감싸고 있는 영역보다 커졌을 때), 내용을 잘라낼 지, 스크롤 바를 보여줄 지, 혹은 범위를 넘어가게 보여줄 지를 기술합니다. visible(기본값)이 아닌 다른 값으로 overflow 속성을 사용할 경우 새로운 블록 서식 문맥 (block formatting context) 을 생성하게 됩니다. 이 특징은 기술적인 이유로 중요합니다. 만약 스크롤하는 요소와 float이 교차한다면, 각 스크롤 단계마다 내용물을 강제적으로 다시 감싸게 될 것입니다. 이는 결국 스크롤 속도를 느리게 할 것입니다. overflow 속성이 효력을 갖기 위해선, 반드시 블록 레벨 컨테이너의 높이(height 또는 max-height)가 설정되어 있거나, white-space가 nowrap으로 설정되어야 합니다.`

const box = document.querySelectorAll('.box');
for (let i = 0; i < box.length; i++) {
  box[i].textContent = text;
🕑 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.