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

              
                
<div class="wrapper">
  <div class="bg">
<!--     <img src="http://lorempixel.com/500/500/abstract/" alt="" /> -->
  </div>
  <div class="blend-mask">
<!-- <div class="msg">Hello</div> -->
<!--       <svg id="svg-dot" height="100" width="100"> -->
<!--         <path fill="black" d="M0,50a50,50 0 1,0 100,0a50,50 0 1,0 -100,0"/> -->
<!--       </svg> -->

      <svg id="my-svg" viewBox="0 0 1000 740" >

       <path id="path-circle" class="" d="M550,370a50,50,0,1,1-50-50A50,50,0,0,1,550,370Z" />


        <path id="bh" 
              class="" 
              fill="black"
              d="M648.5,0.5v199h-69V0.5h-580v740h580v-199h69v199h351V0.5H648.5z M288.9,545.5h-52.4v-118h52.4c32.7,0,59.3,26.2,59.3,59C348.2,519.3,321.6,545.5,288.9,545.5z M288.9,318.5h-52.4v-119h52.4c32.7,0,59.3,26.7,59.3,59.5
	C348.2,291.8,321.6,318.5,288.9,318.5z" />
        
  <path id="hippo" class="st0" d="M13.833,231.876c4.154-55.746,24.442-104.83,60.85-147.292
	c41.031-47.948,92.453-71.909,154.224-71.909c23.493,0,58.398,3.714,104.745,11.058C380,31.148,414.891,34.778,438.411,34.778
	c35.955,0,87.816,13.426,155.586,40.18c12.009,4.566,26.513,17.056,43.554,37.315c9.683,11.967,24.669,30,44.943,53.975
	c4.608,3.246,10.62,8.068,18.005,14.56c7.374,6.408,12.435,9.201,15.171,8.28c0.935-2.792,3.261-6.677,6.947-11.738
	c1.842-1.858,2.978-2.78,3.431-2.78c1.418,0.922,2.779,1.844,4.168,2.78c1.375,0.935,1.829,3.672,1.375,8.28
	c-0.935,8.307-1.375,10.832-1.375,7.584c-0.496,4.637-1.148,7.6-2.083,9.032c-5.997,10.123-8.323,17.978-6.905,23.478
	c1.389,5.046,5.713,13.156,13.114,24.216c7.387,11.058,11.513,19.365,12.433,24.895c-0.453,4.141-0.652,10.803-0.652,20.048
	l-6.932,17.268c0,12.917,14.971,35.075,44.943,66.437c14.319,6.408,21.423,28.568,21.423,66.337
	c0,29.547-24.415,44.262-73.256,44.262c-6.465,0-13.37-0.197-20.756-0.708c-5.061-1.815-12.448-3.885-22.118-6.182
	c-11.511-1.417-19.365-5.302-23.491-11.796c-7.401-10.547-19.396-20.501-35.983-29.715c-2.766-1.333-6.806-6.408-12.108-15.199
	c-5.316-8.762-10.038-14.291-14.164-16.616c-4.126-2.269-10.136-2.751-17.992-1.333c-13.37,2.268-20.755,3.431-22.117,3.431
	c-3.246,0-7.967-0.907-14.178-2.779c-6.237-1.844-10.704-2.779-13.496-2.779c-3.206,14.773-3.929,29.063-2.07,42.873
	c0.453,3.715,2.779,6.72,6.918,8.988c6.479,4.622,9.911,7.146,10.393,7.657c4.125,3.204,8.521,8.506,13.114,15.851
	c0.935,2.806-0.794,7.514-5.189,14.177c-4.382,6.693-7.925,10.634-10.719,11.739c-2.751,1.192-8.749,1.787-17.978,1.787
	c-13.384,0-18.658,0.199-15.88,0.652c-18.43-2.779-28.808-4.367-31.134-4.792c-11.513-2.324-21.437-5.983-29.717-11.086
	c-4.183-2.751-8.974-15.681-14.503-38.734c-5.587-24.897-10.193-39.868-13.866-44.972c-0.907-1.36-2.056-2.012-3.431-2.012
	c-2.326,0-6.138,2.268-11.427,6.918c-5.302,4.537-8.889,7.06-10.704,7.6c-6.437,27.164-9.712,40.065-9.712,38.648
	c0,10.633,2.992,19.564,8.99,26.966c5.983,7.372,12.236,14.518,18.701,21.408c7.825,8.762,11.739,16.362,11.739,22.827
	c0,3.657-1.135,6.861-3.46,9.669c-9.683,11.966-25.832,17.978-48.417,17.978c-25.363,0-41.951-3.46-49.763-10.379
	c-10.165-8.762-16.616-18.005-19.367-27.617c-0.453-2.326-1.601-9.244-3.46-20.756c-0.922-6.947-3.005-11.058-6.195-12.42
	c-9.258-1.389-20.771-3.913-34.566-7.599c-2.793-1.844-5.784-6.465-9.017-13.837c-5.968-14.264-10.364-23.96-13.143-29.036
	c-13.852-6.919-35.968-14.717-66.408-23.451c-1.389,2.779-2.041,6.636-2.041,11.712c5.061,6.465,12.661,16.389,22.812,29.715
	c8.294,11.06,12.448,21.693,12.448,31.815c0,19.396-12.448,29.036-37.344,29.036c-18.898,0-31.8-1.333-38.732-4.112
	c-10.123-4.139-18.658-13.865-25.576-29.036c-11.527-25.406-17.978-39.696-19.367-42.9c-7.387-17.043-12.449-32.07-15.184-45
	c-1.871-9.188-4.65-23.294-8.323-42.193c-3.219-15.624-8.28-27.858-15.197-36.621C23.743,284.206,11.977,255.836,13.833,231.876z"/>
      </svg>
  </div>
</div>


<!-- http://www.nurturedigital.com/blog/2016-04-02-the-blend-mask-how-nurture-was-made -->




              
            
!

CSS

              
                body{
  background-color:orange;
}
.wrapper{
  mix-blend-mode: multiply;
  position: absolute; top:0; left:0; bottom:0; right:0;
  height:100%; width:100%;
  background-color:green;
}
.bg{
  position: absolute; top:0; left:0; bottom:0; right:0;
  height:100%; width:100%;
  // display:block;
  background-image:url('http://lorempixel.com/500/500/abstract/');
  background-size:cover;
  background-position:center;
}

.blend-mask{
  mix-blend-mode: screen;    
  background-color: #fff;
  color:black;

  position: absolute; top:0; left:0; bottom:0; right:0;
  width:100%; height:100%;

  font-size:20vh;
  // letter-spacing:-0.2em;

  pointer-events:none;
}


.msg{
  // position:absolute;
}

#svg-dot{  
  position: absolute; 
  top:50%; left:50%;
  transform:translate(-50%, -50%);
 }


#bh{
  display:none;
}

#my-svg{
  // border:1px solid red;
  position:absolute;
  display:block;
  width:50%;
  height:auto;
  // left:50%; top:50%;
  // transform: translate(-50% -50%);
}

#path-circle{
  position:absolute;
  display:block;
  // left:50%; top:50%;
  // transform: translate(-50% -50%);
}
#hippo{
  display:none;
}

              
            
!

JS

              
                TweenMax.to('.maskman', 1, { 
  scale:0.5, 
  yoyo:true, repeat:-1, 
  ease:Power1.easeInOut
});

/* $(document).on('mousemove', function(e){
    $('#svg-dot').css({
       left:  e.pageX,
       top:   e.pageY
    });
}); */


/* TweenMax.to('#svg-dot', 0.3, {   
  scale:0.5
  ,yoyo:true, repeat:-1, ease:Power1.easeInOut
  ,transformOrigin:"50% 50%"
}); */

// TweenMax.to($("#path-circle"), 1, {morphSVG:$("#bh"), ease:Power1.easeInOut, yoyo:true, repeat:-1, repeatDelay:0.5 });
var MORPHER = $("#path-circle");

var tlm = new TimelineMax({autoPlay:true, ease:Linear.easeNone, yoyo:false, repeat:-1, repeatDelay:0});
tlm.to(MORPHER, 1, {morphSVG:$("#bh"), ease:Power4.easeInOut});
tlm.to(MORPHER, 1, {morphSVG:$("#hippo"), ease:Power4.easeInOut});
tlm.to(MORPHER, 1, {morphSVG:MORPHER, ease:Power4.easeInOut});
tlm.to(MORPHER, 1, {scale:0.2, transformOrigin:"center", ease:Power4.easeInOut});
tlm.to(MORPHER, 1, {scale:1,   transformOrigin:"center", ease:Power4.easeInOut});

// this forces Chrome & Safari to redraw
// TweenMax.to(".svg-clipped", 2, {backgroundColor:"#000000", delay:2,  ease:Power1.easeInOut, yoyo:true, repeat:-1 });


var mySVG = $('#my-svg');  
TweenMax.set(mySVG, {transformOrigin:"-50% -50%" });

$(window).on('mousemove', function(e){
    // TweenMax.to($("#my-svg"), 0, {x: e.pageX, y:e.pageY });
    TweenMax.to($("#my-svg"), 0.5, {
      x: e.pageX-mySVG.width()/2
      ,y:e.pageY-mySVG.height()/2
      ,ease:Power4.easeOut
    });
});


              
            
!
999px

Console