mask - Is there an inverse to the CSS "Clip" property; hide the clipped area? -


the css clip syntax gets define rectangular area of larger image wish visible. there way specify inverse? specify rectangular area of image wish become invisible. punching rectangular hole through page see what's underneath?

reason (if have other ideas): want create 3 layer image in cms template. layer 1 (at bottom) background image. layer 2 sits on portion of layer 1 , rectangular screengrab image of a4 document. layer 3 (on top) transparent png (in centre , @ edges) adds border, drop shadow, doc type logo , page curl effect top right of layer 2 document.

layers 1 , 2 uploaded separately in cms , css should combine them layer 3 image create effect. problem page curl effect work, top right corner of layer 2 needs masked can see way through layer 3 layer 1. hoping clip property allow me specify small square in top right corner of layer 2 should invisible.

alternative: use graphics program combine layers 1 , 3 , leave transparent area layer 2. correct positioning place new combined image on top of layer 2 achieve same effect. however, hoping avoid graphics preparation because may create entire image way.

simple answer: css clip not work that.

i see 2 options:

  1. try fake 'hole' drawing layer3 layer1 background image. make transparent areas of layer3 filled layer1. can see solution in action here: http://cssfilter.saschaseewald.com/

  2. use hmtl canvas element , composite actions combine layers like. overview: http://www.html5canvastutorials.com/advanced/html5-canvas-global-composite-operations-tutorial/


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -