Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <svg height="200" width="200" viewBox="0 0 1000 1000">
<filter id="pictureFilter" > <feGaussianBlur stdDeviation="15" /></filter>
    
  <defs>                       <!-- Set up some definitions we'll use -->
    <linearGradient id="gradient" gradientUnits="userSpaceOnUse" 
   x1="0%" y1="0%" x2="100%" y2="10%" gradientTransform="rotate(-50)"> <!-- a color gradient named "fade" -->
      <stop offset="5%" stop-color="#ddd"/>    <!-- Start a dark blue -->
      <stop offset="15%" stop-color="#fff"/>  <!-- Fade to light blue -->
    </linearGradient>
  </defs>
    
<circle cx="500" cy="500" r="450" style="fill: black;"/>    
<circle cx="500" cy="500" r="445" fill= "url(#gradient)"/>  

<path d="M978,500c0,263.99-214.01,478-478,478s-478-214.01-478-478,214.01-478,478-478,478,214.01,478,478zm-888.93,237.25,20.179-11.65m779.16-449.85l22.517-13m-648.18,648.18,11.65-20.18m449.85-779.16l13-22.517m-711.75,410.93h23.305m899.7,0h26m-885.43-237.25,20.179,11.65m779.16,449.85,22.517,13m-648.18-648.18l11.652,20.183m449.85,779.16,13,22.517m-237.25-885.43v23.305m0,899.7,0,26"/>
 <g id="main"
     transform="matrix(0.86417189,0,0,0.86417189, 97.73501,  624.89871)">
    <path
       id="path3034"
       style="fill:#000000;stroke:#000000;stroke-width:1.83567977px;stroke-linecap:butt;stroke-linejoin:miter"
       d="m 537.26,-523.01 c -1.071,-0.0208 -2.1736,0.0165 -3.2699,0.0573 -6.8205,0.24918 -14.112,1.6636 -21.569,3.9582 -10.208,3.5648 -15.259,11.588 -15.259,11.588 l -2.3518,24.093 -19.906,8.7768 15.718,1.4341 0,6.9412 -4.1303,12.964 -6.4822,11.588 3.2125,2.352 0,6.0233 -13.423,10.154 c 0,0 -19.168,6.1381 -29.658,15.316 -17.701,14.423 -32.927,32.01 -32.927,32.01 -8.5228,14.423 -12.506,30.117 -12.506,30.117 -7.2115,15.079 -10.67,35.222 -10.67,35.222 l 1.3767,59.832 8.8343,32.87 2.2946,64.478 23.175,-2.8109 c 2.6658,7.1769 9.7921,11.917 15.775,16.693 6.8739,5.4872 13.923,13.236 22.717,13.423 9.9526,0.21197 19.687,-2.5289 28.912,-6.9985 l 4.4745,11.645 9.2357,-3.6714 4.6466,13.882 -3.7861,6.5396 -46.294,15.718 0,12.047 -52.833,3.7287 9.2931,106.58 160.39,-5.5644 -2.8109,-107.5 -25.929,-0.9752 -2.8108,-12.964 -15.947,-6.1954 c 1.115,-1.4983 2.138,-3.1028 2.9829,-4.9334 -0.9272,-15.762 -8.3179,-25.929 -8.3179,-25.929 l 6.4823,-4.6466 -6.4248,-21.11 c 1.8659,-1.7652 3.6986,-3.5568 5.4494,-5.335 5.3126,-5.3949 4.9786,-12.801 9.6949,-20.02 l 1.893,-0.40156 0.1137,-2.2946 4.9909,-101.99 0,-8.3179 c 0,0 7.1296,-13.071 9.752,-25.527 0,-17.701 -25.929,-62.069 -25.929,-62.069 l -30.633,-44.515 -3.2125,-9.2931 20.364,6.4822 6.0235,-13.423 6.0233,-2.8109 -6.0233,-11.129 2.8108,-11.588 7.8591,-0.91784 1.8357,9.2931 8.8342,5.1055 -0.459,10.211 8.318,1.3768 2.8109,-9.2931 -5.5645,-9.2358 6.0233,-8.8342 13.423,0.45891 7.4576,6.4822 -9.7521,6.4822 5.5643,5.1055 9.2358,-7.859 -1.3767,-9.7521 18.07,1.893 -18.988,-12.563 0,-23.175 c 0,0 -9.4816,-11.26 -16.693,-13.882 -5.8081,-3.5495 -12.639,-5.2455 -20.135,-5.3923 z m -6.7692,86.047 0.9752,16.234 -5.1054,3.2124 15.718,0.9752 14.398,2.7535 -13.423,-8.8342 -12.563,-14.341 z m -59.373,247.3 c 0.3086,-0.0314 0.601,0 0.9179,0 5.0692,0 9.1784,4.1093 9.1784,9.1784 0,5.0691 -4.1092,9.1784 -9.1784,9.1784 -5.0691,0 -9.1785,-4.1093 -9.1785,-9.1784 0,-4.7523 3.6325,-8.7084 8.2606,-9.1784 z m 26.904,91.497 -2.7536,4.7039 13.94,5.5644 c 0,0 6.1218,-2.2274 11.76,-7.5148 l 15.087,5.6791 -0.9178,9.2358 -75.091,1.893 0,-7.4574 37.976,-12.104 z"
       />
</g>
<g
     id="min"
     transform="matrix(-0.76392902,-0.0756532,0.09968571,-0.74005145,867.17878,399.65043)"
     inkscape:transform-center-x="5.5553978"
     inkscape:transform-center-y="-118.40057">
    <path
       id="path3832"
       style="fill:#000000;stroke:#000000;stroke-width:1.83567977px;stroke-linecap:butt;stroke-linejoin:miter"
       d="m 480,460 c -10.845,1.7392 -21.049,11.34 -26.375,20.916 -4.7391,8.5197 -4.1783,19.9 -1.2266,29.192 2.8914,9.1009 12.025,14.902 17.521,22.71 6.327,8.9891 17.763,27.779 17.763,27.779 l 42.444,101.45 -45.045,167.6 -11.376,17.668 3.7284,24.732 5.082,2.5407 30.234,-4.5579 10.492,-8.1373 28.863,1.7403 35.214,-5.7728 c 0,0 8.6113,1.0006 8.146,-8.3056 -14.719,-4.3444 -33.571,-5.2654 -33.571,-5.2654 l -15.888,-8.8014 -8.8616,-11.833 -11.937,-1.4492 1.3355,-16.155 38.848,2.5553 5.0219,-59.814 c 0,0 25.965,-81.077 22.926,-106.14 -3.4634,-28.561 -45.004,-127.28 -45.004,-127.28 -0.50809,-1.437 -35.554,-53.913 -63.67,-55.608 -1.5626,-0.0942 -3.1138,-0.01 -4.6632,0.23888 z m 10.944,35.653 c 0.30037,-0.0771 0.59419,-0.0895 0.90744,-0.13685 5.0125,-0.75565 9.6885,2.6952 10.444,7.7076 0.75565,5.0124 -2.6953,9.6884 -7.7077,10.444 -5.0124,0.75564 -9.6884,-2.6952 -10.444,-7.7076 -0.70842,-4.6992 2.2936,-9.1525 6.8002,-10.307 z"
       />
</g>
<g
     id="hour"   
    transform="matrix(-0.03964706,-0.7631427,0.7631427,-0.03964706,644.36428,850.00826)"
     inkscape:transform-center-x="50.868712"
     inkscape:transform-center-y="-92.170814"  >
    <path
       id="seca"
       style="fill:#000000;stroke:#000000;stroke-width:1.83567977px;stroke-linecap:butt;stroke-linejoin:miter"
       d="m 580,330 c -2.7473,1.148 -4.6449,2.131 -4.6449,2.131 l -47.738,48.822 -35.916,43.781 c 0,0 -47.094,55.994 -49.94,90.26 -1.0448,12.582 4.1108,26.417 12.632,35.733 5.1671,5.6494 13.552,7.3642 20.892,9.5421 8.432,2.5021 17.876,7.0343 26.096,3.9036 23.568,-8.9767 36.871,-35.716 48.419,-58.135 4.8542,-9.4243 8.0786,-30.76 8.0786,-30.76 l 25.365,-60.796 57.366,63.773 5.1362,13.888 9.2348,4.3027 7.3878,16.999 -4.2934,20.249 2.7784,15.401 20.814,2.0218 17.516,-6.1119 35.536,11.156 47.504,-1.3105 -0.4818,-7.2947 -24.088,-5.2128 -26.097,-19.936 -13.428,-17.087 -8.3708,0.42293 -24.423,-19.624 15.838,-29.944 -37.354,-32.889 -23.335,-30.527 -29.28,-51.143 c 0,0 -8.5625,-12.983 -15.462,-14.777 -4.2468,-1.1038 -11.162,1.2501 -15.74,3.1634 z m -90.607,170.26 c 0.27409,-0.14502 0.55696,-0.22583 0.85063,-0.34491 4.6975,-1.9047 10.05,0.35926 11.955,5.0568 1.9048,4.6976 -0.35934,10.05 -5.0569,11.955 -4.6976,1.9048 -10.05,-0.35925 -11.955,-5.0569 -1.7857,-4.404 0.0938,-9.435 4.2062,-11.61 z"
       />
</g>
<path d="M500,500,500,130" id="sec" />
<circle cx="500" cy="500" r="20" style="fill: white;"/>
<circle cx="500" cy="500" r="14" style="fill: black;"/>    
</svg>
              
            
!

CSS

              
                html {
  background: #666;  
}
svg {
  position: absolute;
  top: 10%;
  width: 100%;
  height: 80%;
  opacity:1;
      -webkit-transition: opacity 1.5s ease-in; //for chrome, safari
    -moz-transition: opacity 1.5s ease-in; //for mozilla firefox
    -o-transition: opacity 1.5s ease-in; //for opera
}

svg:hover {
 // filter: url(#pictureFilter);
 //  opacity:0.5;

}

path {
  stroke: #09151b;
  stroke-linecap:round;
  stroke-width: 42;
  fill:none;
}

#sec {
  stroke: #000000;
  stroke-width: 4;
}
              
            
!

JS

              
                setInterval(function() {
  function r(el, deg) {
    el.setAttribute('transform', 'rotate('+ deg +' 500 500)')
  }
  var d = new Date();
  r(sec, 6*d.getSeconds());
  r(min, 6*d.getMinutes()-180);
  r(hour, 30*(d.getHours()%12) + d.getMinutes()/2-100);
}, 1000)
              
            
!
999px

Console