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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="flyhappy">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="400px" height="400px" viewBox="0 0 72 72" enable-background="new 0 0 72 72" xml:space="preserve">
  

  <path class=plane id="plane" fill="none" stroke="#000000" stroke-width="0.2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
	M58.748,38.171c0,0,0.729-0.209,1.668-0.521s0.627-1.564,0.418-1.981c-0.21-0.417-1.774-0.939-1.774-0.939
	s10.483-11.788,10.535-11.891c0.051-0.103-3.083-0.104-3.233-0.104s-12.518,8.552-12.518,8.552s-3.344-6.263-3.44-6.362
	c-0.099-0.098-2.019-0.208-2.19-0.208c-0.173,0,1.772,7.927,1.772,7.927s-2.279-0.402-3.321-0.611
	c-1.043-0.209-16.903-2.31-16.903-2.31c-2.191-2.19-9.698-21.467-9.82-21.589c-0.122-0.121-2.96,0.284-2.96,1.327
	c0,0.77,4.064,16.614,4.064,16.614s-0.438-0.113-3.351-0.113s-2.419,3.005-2.583,3.005c-2.083,0-4.004,0.018-4.645,0.13
	c-1.616,0.282-1.773,0.521-1.773,0.521s-5.945,3.442-6.57,4.38c-0.626,0.938-0.313,2.295,1.042,3.442
	c1.356,1.148,4.59,1.982,6.571,2.503c1.982,0.522,11.16,1.044,12.412,1.044c1.251,0,6.617,0.384,6.617,0.384
	s4.006,2.439,9.316,5.671c0.209,0.127-0.061,0.719-0.681,0.701c-1.101-0.031-3.285-0.129-4.954,0c-1.491,0.114-2.478,1.4-2.478,3.34
	c0,1.404,1.268,3.16,3.083,3.119c1.448-0.032,4.753-0.018,4.808-0.018c0.808,0,1.622-1.555,2.349-1.891
	c0.572-0.265,1.001-0.107,1.486-0.312c0.265-0.111,0.275-0.771,0.055-0.99c-0.22-0.221-1.672-0.362-1.395-0.403
	c0.834-0.128,3.884,0.2,4.059,0.306c9.28,5.644,19.297,11.724,19.57,11.851c0.514,0.235,3.474-0.05,3.629-0.204
	c0.154-0.155-28.583-21.305-28.583-21.305s12.692-0.583,13.879-0.874c1.128-0.278,1.682-0.216,1.682-0.216
	s13.314,6.891,13.442,6.891c0.125,0,1.98-0.337,1.98-0.416C70.012,46.54,58.748,38.171,58.748,38.171z"/>
<path class=part1 id="part1" fill="none" stroke="#000000" stroke-width="0.2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
	M15.595,28.596c0.057-1.074,0.608-1.917,1.232-1.883c0.623,0.033,1.081,0.93,1.023,2.004c-0.008,0.153-0.026,0.301-0.054,0.443
	l-0.391-0.02c0.037-0.139,0.063-0.287,0.072-0.444c0.038-0.718-0.268-1.318-0.685-1.34s-0.785,0.541-0.824,1.258
	c-0.008,0.16,0.001,0.312,0.024,0.455l-0.39-0.02C15.59,28.904,15.587,28.752,15.595,28.596z"/>
<path class=glasss id="glass" fill="none" stroke="#000000" stroke-width="0" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
	M19.236,37.71c0-0.326-0.645-1.735-1.459-1.93s-4.265-0.391-4.411-0.391c-0.146,0,0,1.303-0.098,1.369
	c-0.097,0.064-2.679-0.112-3.033-0.219c-0.924-0.279-3.125-3.593-3.419-3.984c-0.293-0.392-0.531-0.611-0.13-1.011
	c0.4-0.399,1.532-0.847,1.532-0.847c0.652-0.261,1.922,2.509,3.127,3.16c1.206,0.651,2.021,0.749,2.021,0.749
	s2.267,0.524,3.992,0.565c1.496,0.034,2.399,1.723,2.53,2.31C20.018,38.067,19.236,38.034,19.236,37.71z"/>
<path class=part2 id="part2" fill="none" stroke="#000000" stroke-width="0.2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
	M33.852,50.541l-0.262,0.758l-0.232,0.67l-0.044,0.128c-0.025,0.068-0.052,0.135-0.083,0.198l-0.261-0.744
	c-0.001,0.006-0.002,0.012-0.003,0.017l-0.093-0.265l-0.247-0.701l-0.018-0.054l-0.095-0.272l0.455-0.003
	c-0.147-0.521-0.466-0.883-0.838-0.883c-0.51,0-0.924,0.684-0.924,1.527s0.414,1.527,0.924,1.527c0.293,0,0.556-0.228,0.724-0.58
	l0.241,0.686c-0.25,0.4-0.589,0.651-0.965,0.651c-0.764,0-1.384-1.022-1.384-2.284s0.62-2.285,1.384-2.285
	c0.629,0,1.158,0.692,1.328,1.639l0.489-0.002L33.852,50.541z"/>
</svg>
</div>
              
            
!

CSS

              
                .flyhappy {
  text-align: center;
}
.plane {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: dash 3s infinite;
  animation-timing-function: ease-in-out; 
}
.part1 {
  stroke-dasharray: 300;
  stroke-dashoffset: 0;
  animation: dash 3s infinite;
  animation-timing-function: ease-in; 
  animation-delay: 1s;
}
.part2 {
  stroke-dasharray: 500;
  stroke-dashoffset: 0;
  animation: dash 2s infinite;
  animation-timing-function: ease-in; 
  animation-delay: 1s;
}
.glasss {
  stroke-dasharray: 700;
  stroke-dashoffset: 0;
  animation: dash 2s infinite;
  animation-timing-function: ease-in;
  animation-delay: 1s;
  fill: black;
}
@keyframes dash {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}
              
            
!

JS

              
                paths = document.querySelectorAll('path'); 

document.querySelector('button').addEventListener('click',function(){
   
  document.querySelector('.wrapper').classList.toggle('small');
  
  Array.prototype.forEach.call(paths,function(item,index){
  
    item.classList.remove('scaleMe')
  
  })  

})


Array.prototype.forEach.call(paths,function(item,index){  

  item.addEventListener('mouseenter',function(){ 
  
    var _this = this;
  
    this.classList.toggle('scaleMe')
 
    this.addEventListener('transitionend',function(){
    
      _this.classList.toggle('scaleMe')
  
    })

  })
})
              
            
!
999px

Console