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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.



Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO


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.

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.


Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:


Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO


                <svg version="1.1" xmlns="" xmlns:xlink="" xmlns:a="" width="1286" height="400" viewBox="0 0 600 400" enable-background="new 0 0 600 4S00"
<g fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10' stroke-width='0' stroke='#ffff00'>
<path id="puff" d="M37.6.5v320.4S2.2 264 .5 443.4"/>


                body, html {
  background-color: white;
  height: 100%;
  overflow: hidden;
#emitter {
  background-color: yellow;
  position: absolute;
  width: 5vmin;
  height: 5vmin;
  border-radius: 50%;
  top: 90vh;
  left: calc((100vw - 20vmin)/2);
svg {
  width: 100%;
  height: 100%;
.dot {
  position: absolute;


                var bombContainer = document.createElement("div"); = "position:absolute; left:40%; top:20%; overflow:visible; z-index:5000; pointer-events:none;";

var emitter = document.querySelector("#puff"),
    //the following variables make things configurable. Play around.
    emitterSize = 20,
    dotPool = [],
    dotIndex = 0,
    dotQuantity = 30,
    dotSizeMax = 50,
    dotSizeMin = 30,
    speed = 1,
    gravity = 1,dot=[];

//just for this demo, we're making the emitter's size dynamic and we set xPercent/yPercent to -50 to accurately center it.
//TweenLite.set(emitter, { width:emitterSize, height:emitterSize, xPercent:-50, yPercent:-50 });
for (var i = dotQuantity - 1; i >= 0; i--) {
  dot = document.createElement("div");
  dot.className = "dot";
//  TweenLite.set(dot, { xPercent:-50, yPercent:-50, force3D:true });
  dotPool[i] = dot;

var dot1 =document.querySelector('#puff'),dot2;
for(var i=dotQuantity-1;i>=0;i--){
dot[i] = document.createElement("div");
dot[i].className = "dot";
	var svg = document.createElementNS("", "svg");
	dot2 = dot1.cloneNode(true);
	TweenLite.set(dot[i], {xPercent:-50, yPercent:-50, force3D:true});
//	dotPool[i] = dot;

var explosion = new TimelineMax(/*{ repeat: -1 }*/).call(shootDot, [emitter]);

function shootDot(emitter) {
  var angle, length, i, size, bounds = emitter.getBoundingClientRect();
  //create all the dots
  var t=new TimelineMax();
 // dot = dotPool[dotIndex++];
 // if (dotIndex === dotQuantity) dotIndex = 0;
 for (k = 0; k < dotQuantity; k++) {
  size = getRandom(dotSizeMin, dotSizeMax);
  angle = Math.random() * Math.PI * 2; //random angle
  //figure out the maximum distance from the center, factoring in the size of the dot (it must never go outside the circle), and then pick a random spot along that length where we'll plot the point. 
  length = Math.random() * (emitterSize / 2 - size / 2); 
  //place the dot at a random spot within the emitter, and set its size.
  TweenLite.set(dot[k], {
//	scale:2.5,

    x:Math.cos(angle) * length + bounds.left + bounds.width / 2,
    y:Math.sin(angle) * length + + bounds.height / 2,
 // console.log("X "+Math.cos(angle) * length + bounds.left + bounds.width / 2+" Y "+Math.sin(angle) * length + + bounds.height / 2 +" Size "+size);
  //this is where we do the animation...
  t.fromTo(dot[k], 1 + Math.random(), {drawSVG:"0 10%"}, {drawSVG:"99.5% 116%", stroke:'#ff8000',
      angle:angle * 180 / Math.PI, //translate radians to degrees
      velocity:(100 + Math.random() * 250) * speed, //initial velocity
      gravity:500 * gravity //you could increase/decrease this to give gravity more or less pull
/*[k], 1 + Math.random(), {

      angle:angle * 180 / Math.PI, //translate radians to degrees
      velocity:(100 + Math.random() * 250) * speed, //initial velocity
      gravity:500 * gravity //you could increase/decrease this to give gravity more or less pull

    //if you'd rather not do physics, you could just animate out directly by using the following 2 lines instead of the physics2D:
    //x:Math.cos(angle) * length * 6, 
    //y:Math.sin(angle) * length * 6
  }, 0);*/

function getRandom(min, max) {
  return min + Math.random() * (max - min);
TweenMax.set("#puff", {
  transformOrigin: '50% 50%',
  rotation: 45,
TweenLite.set("#puff", {xPercent:-100, yPercent:-50, transformOrigin:"center"});

Promise you'll await for me.