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.

            
              - var d = 2000, k = .2, f = .2;
- var o = -.15*d;
- var x = .75*d, l = k*x, sl = f*l;
- var r = .5*sl;
- var sw = .005*d, fs = .07*d;

svg(viewBox=[o, o, 2*d, d].join(' ')
		xmlns='http://www.w3.org/2000/svg' 
		xmlns:xlink='http://www.w3.org/1999/xlink')
	style
		| svg > * {
		| 	fill: #f90;
		| 	font: #{fs}px comic sans ms, noteworthy, dancing script ot, ubuntu, cursive
		| }
		| [d] ~ * { stroke: #333; stroke-width: #{sw} }
		| [y] { fill: #95a }
		| [y] + [y] { fill: #b53 }
		| #t+* {
		| 	fill: #333;
		| 	font: 700 #{fs}px courier new, monospace
		| }
	text(x=o + x + 2.15*fs y=4*l + 1.5*fs) scale: slow
	text(x=o + x + .2*fs y=4*l) translate: fast
	g#t
		text(x=o + .2*fs y=4*l) translate: slow
		text(x=o + 2.15*fs y=4*l + 1.5*fs) scale: fast
	text(x=.5*l - .7*fs y=2*l + .5*fs) 0%
		tspan(dx=x - 2*fs) 50%
		tspan(dx=x - 2.4*fs) 100%
	use(xlink:href='#t' x=2*x)
	path(d=`M0 0h${l}v${l}H0
					M${2*x} 0h${l}v${l}h${-l}
					M${x + .5*(1 - f)*l} ${.5*(1 - f)*l}h${sl}v${sl}h${-sl}`)
	path(d=`M${.5*l} ${3*l}h${2*x}`)
	circle#c(cx=.5*l cy=3*l r=r)
	use(xlink:href='#c' x=x)
	use(xlink:href='#c' x=2*x)

// minimal SVG
<svg viewBox='-300 -300 4000 2000' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><style>svg>*{fill:#f90;font:140px comic sans ms,noteworthy,dancing script ot,ubuntu,cursive}[d]~*{stroke:#333;stroke-width:10}[y]{fill:#95a}[y]+[y]{fill:#b53}#t+*{fill:#333;font:700 140px courier new,monospace}</style><text x='1501' y='1410'>scale:slow</text><text x='1228' y='1200'>translate:fast</text><g id='t'><text x='-272' y='1200'>translate:slow</text><text x='1' y='1410'>scale:fast</text></g><text x='60' y='670'>0%<tspan dx='1300'>50%</tspan><tspan dx='1200'>100%</tspan></text><use xlink:href='#t' x='3000'/><path d='M0 0h300v300H0M3000 0h300v300h-300M1620 120h60v60h-60'/><path d='M150 900h3000'/><circle id='c' cx='150' cy='900' r='30'/><use xlink:href='#c' x='1500'/><use xlink:href='#c' x='3000'/></svg>
            
          
!
            
              body {
	display: flex;
	flex-direction: column;
	margin: 0;
	height: 100vh;
}
            
          
!
999px
Loading ..................

Console