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.

            
              
<section class="style-1">
  <h2 id="style-name">School Essay</h2>
  <ol id="quotes">
    <li><p>The early bird catches <del>the worm</del><ins>less sleep</ins>.</p></li>
    <li><p>The best things in life are <del>free</del><ins>extremely expensive</ins>.</p></li>
    <li><p>Shoot for the moon. Even if you miss, you'll <del>land among the stars</del><ins>suffocate in outer space and die</ins>.</p></li>
    <li><p><del>Everything</del><ins>Nothing</ins> is going to be fine.</p></li>
    <li><p>Big girls don't <del>cry</del><ins>submit to people telling them what to do</ins>.</p></li>
  </ol>
</section>


<button data-style="style-1" data-title="School Essay">Style 1</button>
<button data-style="style-2"data-title="Update on Hover">Style 2</button>
            
          
!
            
              button{
  background:#333333;
  border:0;
  border-radius:3px;
  color:white;
  font-family:'Varela Round', sans-serif;
  margin-top:30px;
  min-width:150px;
  outline:none;
  padding:10px 15px;
  transition:all .3s;
  &:hover{
    background:black;
    cursor:pointer;
  }
  &[disabled]{
    background:#898989;
    cursor:not-allowed;
    opacity:.8;
  }
}

body{
  color:#333;
  font-family:"Nunito",sans-serif;
}
#quotes{
  box-sizing:border-box;
  list-style-position:inside;
  padding:0;
  li{
    padding:10px 15px;
  }
  p{
    display:inline-block;
    margin:0;
  }
}

.style-1{
  #quotes{
    border-bottom:1px solid #aaa;
    margin:0;
  }
  li{
    border-top:1px solid #aaa;
  }
  del{
    position:relative;
    text-decoration:none;
    &:before{
      content:"";
      background:#a30000;
      height:1px;
      position:absolute;
      left:-3px;
      top:50%;
      width:90%;
      transform:rotate(1deg);
    }
    &:after{
      content:"";
      background:#a30000;
      height:1.25px;
      position:absolute;
      right:3px;
      bottom:32%;
      width:95%;
      transform:rotate(-.25deg);
    }
  }

  ins{
    color:#a30000;
    font-family: 'Caveat', cursive;
    font-size:1.25em;
    text-decoration:none;
    position:absolute;
    margin-top:-20px;
    margin-left:-50px;
    transform:rotate(-4.5deg);
  }
}

@keyframes borderBlink {
    from, to {
        border-color: transparent;
    }    
    50% {    
        border-color: #333;
    }
}

.style-2{
  li{
    margin-bottom:15px;
  }
  del{
    display:inline-block;
    overflow:hidden;
    padding:0 2px;
    white-space:nowrap;
    transition:all 1s;
    transition-delay:1s;
    background:rgba(255,189,22,.8);
    border-right:1px solid transparent;
    margin:-6px 0;
    max-width:150px;
    padding-right:1px;
    text-decoration:none;
  }
  ins{
    transition:all 1s;
    transition-delay:0;
    background:#00d185;
    display:inline-block;
    margin:-6px 0;
    overflow:hidden;
    padding:0;
    position:relative;
    text-decoration:none;
    white-space:nowrap;
    max-width:0;
  }
  li:hover{
    cursor:pointer;
    del{
      border:0;
      max-width:0;
      padding:0;
      transition-delay:0s;
      + ins{
        max-width:300px;
        padding:0 2px;
        transition-delay:1s;
      }
    } 
  }
}
            
          
!
            
              $(function(){
  $("button").click(function(){
    var style = $(this).data("style");
    $("section").removeAttr("class");
    $("section").addClass(style);
    $("#style-name").html($(this).data("title"));
  })
})
            
          
!
999px
Loading ..................

Console