Pen Settings

HTML

CSS

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

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

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.

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="content">
  <a class="btn">
    <span>Bouton 2</span>
  </a>
</div>

<div class="content">
  <a class="btn">
    <span>Bouton 3</span>
  </a>
</div>

<div class="content">
  <a class="btn">
    <span>Bouton 4</span>
  </a>
</div>

<div class="content">
  <a class="btn">
    <span>Bouton 5</span>
  </a>
</div>

<div class="content">
  <a class="btn">
    <span>Bouton 6</span>
  </a>
</div>

<div class="content">
  <a class="btn">
    <span>Bouton 7</span>
  </a>
</div>

<div class="content">
  <a class="btn">
    <span>Bouton 8</span>
  </a>
</div>
              
            
!

CSS

              
                @font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  src: local('Lato Light'), local('Lato-Light'), url(http://themes.googleusercontent.com/static/fonts/lato/v6/KT3KS9Aol4WfR6Vas8kNcg.woff) format('woff');
}

.content {
  transform:skew(-27deg);
  font-family: 'Lato';
  width:320px; /* Changes hidden right position if you change this width */
  float:left;
  margin:20px;
}
.btn {
    display:block;
    position: relative; 
    background: #fff none repeat scroll 0 0;
    border: 1px solid #999;
    max-width: 100%;
    overflow:hidden; /* Delete this line to see the sliding divs hidden */
    padding: 25px 204px 25px 30px;
    cursor:pointer;
}
.btn span {
    transform:skew(27deg);
    color: #ed1c29;
    display: block;
    position: relative;
    text-align: left;
    z-index: 2;
}
.btn:hover span {
  color:#fff;
}
.btn::after {
    content: "";
    position:absolute;
    transition: all ease 0.3s;
    background: #eee;
    height: 800%;
    margin: -5px 0 0 -5px;
    right: -1670px;
    top: 0px;
    transform: rotate(120deg);
    transform-origin: 0 0 0;
    width: 280%;
}
.btn:hover::after {
    background: #ed1c29;
    right: -1200px;
}
              
            
!

JS

              
                /*

Try to recreate hover effect find on http://www.circuitgillesvilleneuve.ca/fr/nouvelles 

The red sliding effect is actually a <div> contained in the ::after pseudo element of the button. That <div> is transformed and rotated with CSS. His position simply changes when button gets hovered.

*/
              
            
!
999px

Console