cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

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.

            
              <main role="main">

  <div class="property-wrapper">
    <div class="box box-base">
      <div class="box box-skew" id="boxSkew1">Skew</div>
    </div>
    <div class="transform-value">
      <p class="">transform: skew(<span id="forSkew1x">0</span> deg, <span id="forSkew1y">0</span> deg);</p>
      <div>
        <label for="skew1x">x</label>
        <input id="skew1x" type="range" min="-360" max="360" step="1" />
      </div>
      <div>
        <label for="skew1y">y</label>
        <input id="skew1y" type="range" min="-360" max="360" step="1" />
      </div>
      <p class="">transform-origin: <span id="forOrigin1x">0</span>% <span id="forOrigin1y">0</span>%;</p>
      <div>
        <label for="origin1x">x</label>
        <input id="origin1x" type="range" min="-100" max="100" step="1" />
      </div>
      <div>
        <label for="origin1y">y</label>
        <input id="origin1y" type="range" min="-100" max="100" step="1" />
      </div>
    </div>
  </div>
</main>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Roboto+Slab);

main {
  background: linear-gradient(45deg, #fffcef 0%,#f4ffe2 100%);
  font-family: 'Roboto Slab', serif;
  padding: 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
}
.property-wrapper {
  text-align: center;
  display: inline-block;
}
p,
input {
  margin-bottom: 1em;
}
.box {
  height: 75px;
  width: 75px;
  border-radius: 5px;
  text-align: center;
  line-height: 75px;
  display: inline-block;
}
.box-base {
  border:1px dashed grey;
  background-color: lightgrey;
  margin: 0 50px 1em;
}
.transform-value {
  display: inline-block;
  margin-bottom: 10px;
  vertical-align: middle;
  position: relative;
  z-index: 5;
}
.box-skew {
  background-color: gold;
}
            
          
!
            
              var skewVal1x = document.getElementById('forSkew1x').innerHTML;
var skewVal1y = document.getElementById('forSkew1y').innerHTML;
var originVal1x = document.getElementById('forOrigin1x').innerHTML;
var originVal1y = document.getElementById('forOrigin1y').innerHTML;
document.querySelector('#skew1x').addEventListener('input', function() {
    skewVal1x = this.value;
    document.getElementById('forSkew1x').innerHTML = skewVal1x;
    document.querySelector('#boxSkew1').style.webkitTransform = 'skew(' + skewVal1x + 'deg, ' + skewVal1y + 'deg)';
  document.querySelector('#boxSkew1').style.transformOrigin = originVal1x + '% ' + originVal1y + '%';
});
document.querySelector('#skew1y').addEventListener('input', function() {
    skewVal1y = this.value;
    document.getElementById('forSkew1y').innerHTML = skewVal1y;
    document.querySelector('#boxSkew1').style.webkitTransform = 'skew(' + skewVal1x + 'deg, ' + skewVal1y + 'deg)';
  document.querySelector('#boxSkew1').style.transformOrigin = originVal1x + '% ' + originVal1y + '%';
});
document.querySelector('#origin1x').addEventListener('input', function() {
    originVal1x = this.value;
    document.getElementById('forOrigin1x').innerHTML = originVal1x;
});
document.querySelector('#origin1y').addEventListener('input', function() {
    originVal1y = this.value;
    document.getElementById('forOrigin1y').innerHTML = originVal1y;
});
            
          
!
999px
Loading ..................

Console