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="svg-wrap">
  <div class="responsive-svg">
    <svg version="1.1" x="0px" y="0px" width="700px" height="290px" viewBox="0 0 700 290">
      <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://placekitten.com/700/290" width="700px" height="290px" clip-path="url(#circle)"></image>
      <clipPath id="circle">
      <path class="wave-path" d="M93.4,281.8C237.9,298.2,564.2,285.40000000000003,611.6,270.1C659,254.8,688.7,236.90000000000003,694.2,214.90000000000003C699.7,192.90000000000003,704,114.10000000000004,694.2,84.90000000000003C684.4000000000001,55.70000000000003,656.5,29.100000000000037,607.3000000000001,17.900000000000034C481.70000000000005,-8.799999999999965,171.4000000000001,-1.099999999999966,117.40000000000009,7.900000000000034C63.40000000000009,16.900000000000034,12.500000000000085,55.000000000000036,6.600000000000094,84.90000000000003C0.6000000000000938,114.80000000000004,-4.299999999999908,181.40000000000003,6.600000000000094,214.90000000000003C17.3,248.4,50.8,275.9,93.4,281.8C93.4,281.8,93.4,281.8,93.4,281.8" data-to="M112.5,261.6c132.5,24.1,415,19.8,463.2,7.4 c46.7-12,85.2-41.3,90.7-63.3c5.5-22,11.3-76,2.7-118c-6.4-31.1-32.7-62-73.1-68.2C469,0,170.1,16.1,116.3,26.3 c-17.2,3.3-78.1,23.5-84.1,53.3c-6,29.9-10.7,86.5,0,120.1C44.3,237.7,89.1,257.3,112.5,261.6z"></path>
              /* コンテナー */
.svg-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 40px;

/* レスポンシブのための記述 */
.responsive-svg {
  position: relative;
   height: 0;
   margin: 0 0 25px;
   padding-top: 41.428571428%; /* padding hack(290 / 700) */
.responsive-svg svg {
  position: absolute;
   top: 0;
   left: 0;
  display: block;
  width: 100%;
  height: 100%;
              var snaps = Snap.selectAll('.wave-path');

// それぞれの.wave-pathに対してアニメーションを実行する
  var pathFrom = snap.attr('d');
  var pathTo = snap.attr('data-to');
  function infAnim( el ,dir) {
    var start,end;
    if(dir ==='up'){
      start = pathFrom;
      end = pathTo;
      dir = 'down';
	    start = pathTo;
      end = pathFrom;
      dir = 'up';
    el.attr('d', start);

Loading ..................