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

              
                .container
  .section
    %h1 The Joy of SVG Animating
    %p Something to tinker with right out of the box.
    %hr
    .illustration
      <svg version="1.1" id="ship_it" x="0px" y="0px" width="400px" height="400.004px" viewBox="0 0 400 400.004" enable-background="new 0 0 400 400.004" xml:space="preserve" preserveAspectRatio="xMinYMin">
      <defs>
      <clipPath id="fundamentalsclipPath">
      <circle fill="none" cx="400" cy="400" r="200"/>
      </clipPath>
      </defs>
      <circle id="f4_background" fill="#E83E27" cx="200" cy="199.003" r="200"/>
      <path id="f4_track" fill="#FFFFFF" d="M332.831,348.506H145.993c-12.53,0-22.725-10.191-22.725-22.721 c0-12.531,10.194-22.727,22.725-22.727h224.835c0.7-1.146,1.383-2.305,2.06-3.466H145.993c-14.441,0-26.189,11.749-26.189,26.191 c0,14.438,11.749,26.187,26.189,26.187H328.83C330.178,350.833,331.512,349.678,332.831,348.506z"/>
      <g id="f4_cog">
      <path fill="none" stroke="#FFFFFF" stroke-width="3.0446" stroke-miterlimit="10" d="M150.98,325.785
      c0,2.412-1.957,4.367-4.37,4.367s-4.37-1.955-4.37-4.367c0-2.416,1.957-4.37,4.37-4.37S150.98,323.369,150.98,325.785z"/>
      <g>
      <path fill="#FFFFFF" d="M148.318,310.357l0.478,4.238c1.525,0.295,2.944,0.887,4.185,1.727l3.33-2.654l2.413,2.415l-2.654,3.329
      c0.84,1.242,1.432,2.662,1.729,4.186l4.237,0.48v3.412l-4.231,0.478c-0.297,1.527-0.895,2.943-1.735,4.188l2.654,3.328
      l-2.413,2.414l-3.33-2.652c-1.241,0.839-2.66,1.438-4.185,1.732l-0.478,4.229h-3.414l-0.481-4.235
      c-1.521-0.297-2.941-0.889-4.185-1.728l-3.327,2.653l-2.413-2.416l2.651-3.327c-0.839-1.243-1.431-2.66-1.729-4.187l-4.234-0.479
      v-3.412l4.231-0.479c0.296-1.524,0.892-2.943,1.731-4.188l-2.654-3.329l2.417-2.415l3.327,2.654
      c1.244-0.84,2.661-1.438,4.188-1.732l0.478-4.23h3.414 M151.039,307.312h-2.721h-3.414h-2.72l-0.305,2.703l-0.248,2.198
      c-0.37,0.136-0.735,0.286-1.092,0.452l-1.729-1.379l-2.127-1.696l-1.924,1.923l-2.417,2.416l-1.925,1.924l1.697,2.127l1.38,1.73
      c-0.166,0.357-0.316,0.723-0.451,1.092l-2.2,0.249l-2.702,0.308v2.719v3.412v2.72l2.702,0.306l2.202,0.25
      c0.135,0.369,0.285,0.733,0.45,1.09l-1.379,1.731l-1.694,2.126l1.921,1.923l2.413,2.415l1.924,1.926l2.128-1.697l1.73-1.381
      c0.356,0.164,0.719,0.314,1.088,0.449l0.25,2.204l0.307,2.701h2.718h3.414h2.72l0.306-2.703l0.249-2.196
      c0.37-0.137,0.734-0.287,1.091-0.453l1.731,1.379l2.128,1.695l1.923-1.924l2.413-2.415l1.922-1.925l-1.696-2.126l-1.379-1.729
      c0.166-0.356,0.317-0.722,0.452-1.092l2.2-0.248l2.703-0.305v-2.721v-3.412v-2.719l-2.701-0.308l-2.206-0.25
      c-0.135-0.37-0.285-0.733-0.449-1.09l1.38-1.731l1.695-2.127l-1.922-1.924l-2.413-2.414l-1.923-1.926l-2.128,1.696l-1.733,1.382
      c-0.356-0.165-0.719-0.314-1.088-0.449l-0.249-2.201L151.039,307.312L151.039,307.312z"/>
      </g>
      </g>
      <g id="f4_feature_box">
      <rect x="171.939" y="244.277" fill="#FFFFFF" width="58.727" height="52.435"/>
      <rect x="184.458" y="258.293" fill="#F3765D" width="33.687" height="20.768"/>
      <rect x="188.062" y="264.523" fill="#E83E27" width="26.477" height="4.151"/>
      </g>
      <g id="f4_flash">
      <path fill="#FFFFFF" d="M257.143,230.418l-18.656,10.771c0.509,0.814,0.992,1.646,1.447,2.494l18.647-10.767 C258.118,232.073,257.641,231.238,257.143,230.418z"/>
      <path fill="#FFFFFF" d="M157.501,264.323c0-0.483,0.021-0.962,0.037-1.441h-21.521c-0.011,0.479-0.037,0.958-0.037,1.441 s0.026,0.962,0.037,1.442h21.521C157.522,265.286,157.501,264.809,157.501,264.323z"/>
      <path fill="#FFFFFF" d="M245.1,264.323c0,0.483-0.021,0.963-0.037,1.442h21.521c0.01-0.48,0.036-0.959,0.036-1.442 s-0.026-0.962-0.036-1.441h-21.521C245.079,263.361,245.1,263.84,245.1,264.323z"/>
      <path fill="#FFFFFF" d="M199.859,199.041v21.521c0.48-0.017,0.959-0.037,1.443-0.037c0.482,0,0.962,0.021,1.439,0.037v-21.521 c-0.48-0.01-0.957-0.036-1.439-0.036C200.818,199.005,200.34,199.031,199.859,199.041z"/>
      <path fill="#FFFFFF" d="M232.705,207.042l-10.766,18.647c0.85,0.455,1.681,0.939,2.496,1.449l10.771-18.656 C234.385,207.982,233.549,207.506,232.705,207.042z"/>
      <path fill="#FFFFFF" d="M144.02,232.917l18.647,10.767c0.455-0.85,0.94-1.68,1.448-2.494l-18.656-10.771 C144.959,231.238,144.483,232.073,144.02,232.917z"/>
      <path fill="#FFFFFF" d="M178.166,227.139c0.815-0.508,1.646-0.992,2.497-1.447l-10.767-18.647c-0.844,0.464-1.68,0.94-2.501,1.438 L178.166,227.139z"/>
      </g>
      <g id="f4_drop_tube">
      <polygon fill="#FFFFFF" points="273.672,136.201 124.672,136.201 143.882,93.225 254.462,93.225   "/>
      <path fill="#F3765D" d="M182.871-0.261c-15.057,1.277-29.638,4.22-43.558,8.648l-1.561,2.954h-0.103l0.051,0.098l-0.051,0.097 h0.103l6.13,11.605l-6.13,11.604h-0.103l0.051,0.098l-0.051,0.097h0.103l6.108,11.564l-6.107,11.562h-0.104l0.052,0.098 l-0.052,0.099h0.104l6.129,11.603l-6.129,11.604h-0.104l0.052,0.098l-0.052,0.099h0.104l6.129,11.604h110.58l6.13-11.604h0.104 l-0.051-0.099l0.051-0.098h-0.104l-6.13-11.604l6.13-11.603h0.104l-0.051-0.099l0.051-0.098h-0.104l-6.107-11.562l6.108-11.564 h0.103l-0.051-0.097l0.051-0.098h-0.103l-6.131-11.604l6.131-11.605h0.103l-0.051-0.097l0.051-0.098h-0.103l-1.89-3.577 c-13.32-4.084-27.232-6.808-41.575-8.025H182.871z"/>
      <path fill="#E83E27" d="M237.854,2.595c-12.26-2.349-24.91-3.594-37.854-3.594c-12.943,0-25.595,1.245-37.853,3.593L237.854,2.595 L237.854,2.595z"/>
      <path fill="#E83E27" d="M255.855,8.485H142.49l0.675-1.277c-2.629,0.778-5.239,1.6-7.821,2.482 c-0.048,0.058-0.101,0.111-0.141,0.177c-0.29,0.481-0.41,1.028-0.391,1.572c-0.019,0.544,0.101,1.089,0.391,1.571 c0.082,0.136,0.19,0.248,0.292,0.367l5.158,9.764l-5.159,9.764c-0.101,0.118-0.209,0.229-0.291,0.366 c-0.29,0.481-0.41,1.028-0.391,1.571c-0.019,0.544,0.101,1.09,0.391,1.571c0.082,0.136,0.19,0.248,0.292,0.366l5.137,9.724 l-5.133,9.718c-0.103,0.119-0.212,0.233-0.295,0.37c-0.291,0.482-0.41,1.028-0.391,1.573c-0.019,0.544,0.101,1.09,0.391,1.572 c0.083,0.137,0.191,0.25,0.293,0.369l5.156,9.76l-5.156,9.76c-0.102,0.119-0.211,0.232-0.293,0.369 c-0.291,0.482-0.41,1.028-0.391,1.572c-0.019,0.544,0.101,1.091,0.391,1.573c0.083,0.137,0.191,0.25,0.293,0.369l5.2,9.844
      l-18.632,41.684c-0.395,0.883-0.315,1.907,0.211,2.718c0.526,0.812,1.428,1.302,2.396,1.302h149c0.008,0.001,0.016,0,0.02,0 c1.578,0,2.855-1.278,2.855-2.855c0-0.532-0.145-1.029-0.396-1.456l-18.504-41.393l5.199-9.842c0.104-0.12,0.213-0.233,0.295-0.371 c0.291-0.482,0.41-1.028,0.392-1.573c0.02-0.544-0.101-1.09-0.392-1.572c-0.082-0.138-0.191-0.251-0.295-0.371l-5.154-9.758 l5.154-9.758c0.104-0.12,0.213-0.233,0.295-0.371c0.291-0.482,0.41-1.028,0.392-1.573c0.02-0.544-0.101-1.09-0.392-1.572 c-0.082-0.138-0.191-0.251-0.295-0.371l-5.133-9.717l5.137-9.724c0.102-0.119,0.209-0.23,0.291-0.367
      c0.291-0.481,0.41-1.027,0.392-1.571c0.02-0.543-0.101-1.09-0.392-1.571c-0.082-0.136-0.189-0.248-0.291-0.366l-5.158-9.764 l5.158-9.764c0.102-0.119,0.209-0.23,0.291-0.367c0.291-0.481,0.409-1.027,0.392-1.571c0.019-0.544-0.101-1.09-0.392-1.571 c-0.082-0.136-0.189-0.248-0.291-0.367l-0.263-0.496c-2.552-0.84-5.12-1.641-7.716-2.38L255.855,8.485z M255.855,37.794 l-3.069,5.812H145.56l-3.07-5.812H255.855z M142.49,31.889l3.113-5.893h107.139l3.113,5.893H142.49z M142.491,78.613l3.112-5.893 h107.139l3.113,5.893H142.491z M255.855,84.521l-3.09,5.849H145.58l-3.089-5.849H255.855z M252.742,67.009H145.603l-3.112-5.892 h113.364L252.742,67.009z M142.491,55.209l3.069-5.81h107.226l3.069,5.81H142.491z M269.268,133.346H129.076l16.638-37.222H252.63 L269.268,133.346z M252.742,20.285H145.603l-3.113-5.894h113.365L252.742,20.285z"/>
      </g>
      </svg>
              
            
!

CSS

              
                @import compass

*
  box-sizing: border-box

///////////////////
//BASIC ELEMENTS //
///////////////////

html, body
  font-family: "DIN Next LT Pro", "Helvetica", "Arial", sans-serif
  font-size: 62.5%
  text-align: center
  background-color: #f3f4f4

h1
  font-weight: 700
  font-size: 4rem
  margin: 6rem auto 2.5rem

h1 + p
  font-weight: 400
  font-size: 1.8rem
  margin-bottom: 30px

hr
  border: 4px solid #e83d26
  width: 180px

///////////////////
// BASIC LAYOUT  //
///////////////////

.container
  width: 60%
  max-width: 900px
  margin: 0 auto

section
  padding: 40px 30px

.illustration
  width: 400px
  height: auto
  margin: 30px auto

  svg
    position: relative
    top: 0
    right: 0
    width: 100%
    max-width: 400px
    border-radius: 50%
  
  @media (max-width: 580px)
    width: 100%
    padding-bottom: 400px
    border-radius: 50%
    max-height: 400px
    
    svg
      border-radius: 0

// FUNDAMENTALS: Ship It!
// ********************

svg#ship_it

  #f4_feature_box
    transform-origin: 201px 270px
    animation: featuredrop 1.4s ease-in infinite

  #f4_cog
    transform-origin: 147px 326px
    animation: gearspin 1.5s linear infinite

  #f4_flash
    opacity: 1
    animation: flashup 1.4s linear infinite

@keyframes flashup
  0%
    opacity: 0
  44%
    opacity: 0
  45%
    opacity: 1
  50%
    opacity: 1
  51%
    opacity: 0
  100%
    opacity: 0

@keyframes featuredrop
  0%
    transform: translateY(-300px)
  40%
    transform: translateY(0px)
  44%
    transform: translateY(-10px)
  50%
    transform: translateY(0px)
  100%
    transform: translateX(300px)

@keyframes gearspin
  from
    transform: rotate(0deg)
  to
    transform: rotate(360deg)
              
            
!

JS

              
                
              
            
!
999px

Console