Pen Settings

HTML

CSS

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.

+ 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

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.

HTML

              
                <!--
  This SVG Icon is currently under development. You can use it if you want. If you do, I would love to see it in use. Drop me a message or comment.

  You can find some more Animated Icons in my Collection
  https://codepen.io/collection/XyyOGm/
-->

<svg id="bulb-svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="196px"
	 height="196px" viewBox="0 0 196 196" enable-background="new 0 0 196 196" xml:space="preserve">  
<g id="bulb">      
	<path id="bulb_body" fill="#FFFFFF" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M138,86.465
		c0-22.284-18.131-40.348-40.5-40.348c-22.367,0-40.5,18.064-40.5,40.348c0,13.2,6.363,24.918,16.201,32.279v12.91
		c0,1.781,1.449,3.229,3.238,3.229h42.12c1.789,0,3.24-1.445,3.24-3.229v-12.91C131.637,111.384,138,99.665,138,86.465z"/>
	<g id="sockel">
		<path fill="#96BF1F" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M119.013,139.598
			c0,1.803-1.468,3.266-3.276,3.266H79.689c-1.81,0-3.276-1.463-3.276-3.266l0,0c0-1.805,1.468-3.267,3.276-3.267h36.046
			C117.545,136.331,119.013,137.793,119.013,139.598L119.013,139.598z"/>
		<path fill="#96BF1F" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M119.013,146.128
			c0,1.804-1.468,3.267-3.276,3.267H79.689c-1.81,0-3.276-1.463-3.276-3.267l0,0c0-1.804,1.468-3.267,3.276-3.267h36.046
			C117.545,142.861,119.013,144.324,119.013,146.128L119.013,146.128z"/>
		<path fill="#96BF1F" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M119.013,152.659
			c0,1.804-1.468,3.267-3.276,3.267H79.689c-1.81,0-3.276-1.463-3.276-3.267l0,0c0-1.804,1.468-3.267,3.276-3.267h36.046
			C117.545,149.395,119.013,150.855,119.013,152.659L119.013,152.659z"/>
		<path fill="#96BF1F" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M119.013,159.191
			c0,1.803-1.468,3.266-3.276,3.266H79.689c-1.81,0-3.276-1.463-3.276-3.266l0,0c0-1.805,1.468-3.267,3.276-3.267h36.046
			C117.545,155.926,119.013,157.389,119.013,159.191L119.013,159.191z"/>
		<path fill="none" stroke="#3D3D3D" stroke-width="3" stroke-miterlimit="10" d="M89.111,168.988c0,4.093,3.851,7.41,8.602,7.41
			c4.75,0,8.603-3.317,8.603-7.41"/>
		<path fill="none" stroke="#3D3D3D" stroke-width="3" stroke-miterlimit="10" d="M81.116,162.457v3.266
			c0,1.805,1.467,3.267,3.275,3.267h4.72h17.203h4.293c1.809,0,3.275-1.464,3.275-3.267v-3.266"/>
	</g>
	<path fill="none" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M75,89.781v2.427v6.953
		l13,12.769v22.75"/>
	<path fill="none" stroke="#3D3D3D" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M107,134.68v-22.75
		l13-12.769v-6.953v-2.427"/>  
  
	<path id="glow" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" d="M120,89.802
		c0,3.003-2.52,5.438-5.625,5.438c-3.107,0-5.625-2.435-5.625-5.438c0,3.003-2.52,5.438-5.625,5.438
		c-3.107,0-5.625-2.435-5.625-5.438c0,3.003-2.519,5.438-5.625,5.438s-5.625-2.435-5.625-5.438c0,3.003-2.519,5.438-5.625,5.438
		c-3.105,0-5.625-2.435-5.625-5.438"/>  
  	
</g> 
<g id="licht" style="opacity:0"> 
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="151.088" y1="90.5" x2="170" y2="90.5"/>   
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="25" y1="90.5" x2="43.912" y2="90.5"/>
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="135.392" y1="128.327" x2="148.765" y2="141.677"/>
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="46.234" y1="39.322" x2="59.607" y2="52.673"/>
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" stroke-opacity="0" x1="97.5" y1="143.996" x2="97.5" y2="162.876"/>
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="97.5" y1="18.124" x2="97.5" y2="37.004"/>
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="59.607" y1="128.327" x2="46.234" y2="141.677"/>
		
			<line fill="none" stroke="#96BF1F" stroke-width="3" stroke-linecap="square" stroke-miterlimit="10" x1="148.765" y1="39.322" x2="135.392" y2="52.672"/>

</g>
</svg>
              
            
!

CSS

              
                svg {
  transition: all .3s ease-in-out;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -96px;
  margin-top: -96px;
}

body {
  background-color: #f5f5f5;
}
              
            
!

JS

              
                /*
* Hey Folks, feel free to use this Code
* You can find some more Animated Icons in my Collection
* https://codepen.io/collection/XyyOGm/
*/

var select = function(s) {
    return document.querySelector(s);
  },
  selectAll = function(s) {
    return document.querySelectorAll(s);
  },
  svg = $("svg"),
  bulb_full = select("#bulb"),
  bulb = select("#bulb_body"),
  licht = select("#licht"),
  glow_on = select("#glow");

$('#bulb-svg').on("load", function() {
  var licht_init = new TimelineLite();
  TweenMax.set(licht, {
    opacity: 0,
    scale: 0.6,
    transformOrigin: "50% 50%"
  });
  TweenMax.set(glow, {
    opacity: 1,
    transformOrigin: "50% 50%",
    stroke: "#3D3D3D"
  });
});

$('#bulb-svg').on('mouseenter',function(i) {
    TweenMax.to(bulb_body, 0.3, {
      opacity: 1,
      fill: "#96BF1F"
    });
    TweenMax.to(licht, 0.3, {
        opacity: 1,
        scale: 1
      }),
      TweenMax.to(glow, 0.3, {
        opacity: 1,
      stroke: "#FFFFFF"
      });
  TweenMax.fromTo(licht, 1, {
        scale: 1,

      }, {
      scale: 1.1,
        repeat: -1,
    yoyo: true
  });
 
});

$('#bulb-svg').on('mouseleave',function(i) {
    TweenMax.to(bulb_body, 0.3, {
      opacity: 1,
      fill: "#FFFFFF"
    });
    TweenMax.to(licht, 0.3, {
        opacity: 0,
        scale: 0.8
      }),
      TweenMax.to(glow_on, 0.3, {
        opacity: 1,
         stroke: "#3D3D3D"
      });
});
              
            
!
999px

Console