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

              
                <div class="example">
<h1>css touch-action : auto</h1>
<h3>기본 적용</h3>
<section>
  <div class="container auto">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : none</h1>
<h3>끌기 적용 안됨</h3>
<section>
  <div class="container none">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pan-x</h1>
<h3>사용자가 손을 수평으로 끌고 있을 때 적용</h3>
<section>
  <div class="container panx">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pan-y</h1>
<h3>사용자가 손을 수직으로 끌고 있을 때 적용</h3>
<section>
  <div class="container pany">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pan-left</h1>
<h3>사용자가 손을 왼쪽으로 끌고 있을 때 적용</h3>
<section>
  <div class="container left">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pan-right</h1>
<h3>사용자가 손을 오른쪽으로 끌고 있을 때 적용</h3>
<section>
  <div class="container right">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pan-up</h1>
<h3>사용자가 손을 위쪽으로 끌고 있을 때 적용</h3>
<section>
  <div class="container up">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pan-down</h1>
<h3>사용자가 손을 아래쪽으로 끌고 있을 때 적용</h3>
<section>
  <div class="container down">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pinch-zoom</h1>
<h3>
  여러 손가락을 사용한 확대 및 축소 허용
</h3>
<section>
  <div class="container pinch">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : pinch-zoom</h1>
<h3>
  pan-x & pinch-zoom
</h3>
<section class="width75">
  <div class="container pinch-panx">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="example">
<h1>css touch-action : manipulation</h1>
<h3>손가락 끌기 및 확대, 축소는 활성화 하지만, 비표준 제스쳐는 비활성화</h3>
<section>
  <div class="container manipulation">
    <div></div>
    <div></div>
  </div>  
</section>
</div>

<div class="sidebar">
  <button>auto</button>
  <button>none</button>
  <button>pan-x</button>
  <button>pan-y</button>
  <button>pan-left</button>
  <button>pan-right</button>
  <button>pan-up</button>
  <button>pan-down</button>
    <button>pinch-zoom</button>
  <button>pan-x & pinch-zoom </button>
  <button>manipulation</button>
</div>
              
            
!

CSS

              
                body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(100% - 100px);
  padding: 0 30px;
  flex-direction: column;
}

h1 {
  font-size: 50px;
  text-align:center;
  margin: 0;
  padding: 0;
}

h3 {
  font-size: 40px;
  margin: 10px;
  text-align: center;
  white-space: nowrap;
}

section {
  width: 450px;
  margin: 0 auto;
}

section div:nth-child(1){
  background-image: linear-gradient(to bottom, #c0392b 0%, #c0392b 50%, #3498db 50%, #3498db 100%);
}

section div:nth-child(2){
  background-image: linear-gradient(to bottom, #f1c40f 0%, #f1c40f 50%, #2ecc71 50%, #2ecc71 100%);
}

.container {
  display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    width: 100%;
    height: 65vh;
    overflow: auto;
    position: relative;
}

.container div {
  min-width: 95%;
  height: 100vh;
}

.auto {
  touch-action: auto;
}

.none {
  touch-action: none;
}

.panx {
  touch-action: pan-x;
}

.pany {
  touch-action: pan-y;
}

.left {
  touch-action: pan-left;
}

.right {
  touch-action: pan-right;
}

.up {
  touch-action: pan-up;
}

.down {
  touch-action: pan-down;
}

.pinch {
  touch-action: pinch-zoom;
}

.manipulation {
  touch-action: manipulation;
}

.pinch-panx {
  touch-action: pan-x pinch-zoom;
}

.sidebar {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 100px;
}

button {
  width: 100%;
}

.hide {
  display: none;
}

              
            
!

JS

              
                function alldown() {  $(".example").addClass("hide");
}

$(function(){
  alldown();
  $(".example").eq(0).removeClass('hide');

});

$('button').each(function(index,item){ 
 $(item).click(function(){
   alldown();
    $(".example").eq(index).removeClass('hide');
 });
});


              
            
!
999px

Console