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 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.

Quick-add: + add another resource

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.

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.

              <svg width="190" height="160" xmlns="http://www.w3.org/2000/svg">
  <path d="M10 80 Q 95 10 180 80" stroke="#369" fill="transparent"  stroke-width="5"/>
  <circle cx="10" cy="80" r="10" stroke="transparent" fill="#f63" stroke-width="5"/>
  <circle cx="95" cy="10" r="10" stroke="transparent" fill="#f63" stroke-width="5"/>
  <circle cx="180" cy="80" r="10" stroke="transparent" fill="#f63" stroke-width="5"/>
<div id="path"></div>
              var c1 = document.querySelectorAll("circle")[0],
c2 = document.querySelectorAll("circle")[1],
c3 = document.querySelectorAll("circle")[2],
path = document.querySelectorAll("path")[0],
drag, d = {x1:10,y1:80,x2:95,y2:10,x3:180,y3:80};    

function mdHandler(e){
  if(e.srcElement instanceof SVGCircleElement){
    drag = e.srcElement;
    drag.x = e.srcElement.getAttribute("cx");
    drag.y = e.srcElement.getAttribute("cy");
    drag.clientX = e.clientX;
    drag.clientY = e.clientY;

function mmHandler(e){
  drag.setAttribute("cx",e.clientX - (drag.clientX - drag.x));
  drag.setAttribute("cy",e.clientY - (drag.clientY - drag.y));
  switch( drag ){
    case c1:
      d.x1 = drag.getAttribute("cx");
      d.y1 = drag.getAttribute("cy"); break;    
    case c2:
      d.x2 = drag.getAttribute("cx");
      d.y2 = drag.getAttribute("cy"); break;
    case c3:
      d.x3 = drag.getAttribute("cx");
      d.y3 = drag.getAttribute("cy"); break;      
  path.setAttribute("d",`M${d.x1} ${d.y1} Q ${d.x2} ${d.y2} ${d.x3} ${d.y3}`);
  document.getElementById("path").innerHTML = path.getAttribute("d");
function muHandler(e){
Loading ..................