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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <div class="maxcontainer">
  <div class="thebutton progressive">
    <div class="box drawbox">
      <div class="draw-button">Button
        <svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 205 136" width="183" height="114">
    <path class="draw" fill="none" stroke="#334ee2" stroke-width="1.5" stroke-miterlimit="10" d="M204,35.8c-32.8-2.1-65.8-2.7-98.7-1.8c-24.7,0.7-49.7,2.2-73.3,9.6
      c-12.2,3.8-25.3,10.7-28.6,23C2.1,71,2.3,75.7,3,80.2c3.4,21.4,18.7,40.4,38.8,48.4c12.6,5,26.6,5.7,40.1,4.8
      c19.2-1.4,38.2-6.1,55.9-13.8c6.3-2.8,12.5-6,17.6-10.6c12.6-11.4,16.7-30.4,12.5-46.9c-4.2-16.5-15.6-30.4-29.2-40.6
      C112.1,1.7,75.7-4.3,44,5.8"/>
    </svg>
      </div>
    </div>
    <div class="desccontainer">
      <a class="desc left" target="_blank" href="http://uibuttons.com/">uibuttons</a>
      <a class="desc right" target="_blank" href="https://codepen.io/uibuttons/pen/pbzYqz?editors=1100">Code</a>
    </div>
  </div>

  <div class="thebutton info">
    <div class="boxinformation">
      <h1>SVG Stroke - Bad Handwritting Version</h1>
      <p>Manipulating the stroke of an SVG by changing the placement of the “stroke-dashoffset”.</p><p>The stroke-dashoffset controls where the stroke shows up along it's path. By setting the stroke-dasharray to a large number and the stroke-dashoffest to the same number as the dasharray, the stroke will render outside of its path and appear invisible. Setting the stroke-dashoffset to 0 makes the entire stroke visible.</p>
      <p>
        <a target="_blank" href="https://css-tricks.com/svg-line-animation-works/">Learn more</a>.
      </p>
    </div>

  </div>

</div>
            
          
!
            
              /*** Container ****/

.box.drawbox {
  background: #ff9aa2;
  position: relative;
}

/*** Button Code ****/

.draw-button {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Roboto", sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: 4px;
  color: #fff;
  text-align: center;
  margin: auto;
}

.draw-button svg {
  position: absolute;
  left: 0;
  right: 0;
  margin: -50px auto;
  z-index: -1;
}

.draw {
  margin: auto;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

.draw-button:hover .draw {
  stroke-dashoffset: 0;
  transition: 1.2s;
}


/*** Foundation Code ****/

body {
  background-color: rgba(92, 81, 156, 1);
  font-family: "Roboto", sans-serif;
}

a {
  text-decoration: none;
}

.maxcontainer {
  width: 100%;
  max-width: 1100px;
  margin: auto;
  overflow: auto;
  background: rgba(93, 82, 157, .95);
}

@media screen and (min-width: 750px) {
  .maxcontainer {
    padding: 0;
  }
}

.thebutton {
  float: left;
  width: 95%;
  margin: 2.5% 2.5% 0 2.5%;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  -webkit-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 750px) {
  .thebutton {
    width: 47.5%;
    margin: 2.5% 1.25% 0 1.25%;
  }
}

.box {
  overflow: hidden;
  width: 100%;
  margin: auto;
  height: 0;
  position: relative;
  padding-bottom: 70%;
}

@media screen and (min-width: 650px) {
  .box {}
}

.desccontainer {
  position: relative;
  width: 100%;
  background: rgba(255, 255, 255, 1);
  float: left;
}

.desc {
  float: left;
  font-size: 11px;
  font-weight: 900;
  padding: 10px 0;
  letter-spacing: .25px;
  text-align: center;
  color: #bcbcbc;
  opacity: 1;
  z-index: 2000;
  background: rgba(255, 255, 255, 1);
  transition: all .1s ease-in-out;
  -o-transition: all .1s ease-in-out;
  -moz-transition: all .1s ease-in-out;
  -webkit-transition: all .1s ease-in-out;
}

.desc.left {
  width: 49.7%;
  margin-right: .3%;
  -webkit-box-shadow: 1px 0px 0px 0px rgba(235, 235, 235, 1);
  -moz-box-shadow: 1px 0px 0px 0px rgba(235, 235, 235, 1);
  box-shadow: 1px 0px 0px 0px rgba(235, 235, 235, 1);
}

.desc.right {
  width: 50%;
}

.boxinformation {
  background: none;
  color: #fff;
  font-weight: 200;
  width: 100%;
  margin: auto;
  position: relative;
}

.boxinformation a {
  color: #fff;
  opacity: .4;
  font-weight: bold;
}

.boxinformation a:hover {
  opacity: 1;
}

.thebutton.info {
  -webkit-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0);
  -moz-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0);
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0);
}
            
          
!
999px
Loading ..................

Console