<img src="http://upload.wikimedia.org/wikipedia/commons/5/51/Fox_Head.jpg" alt="" style="position: absolute; width: 300px;">
<svg style="position: absolute; width: 300px; height: 300px;">
<!--
This `path` element draws 3 squares:
1. A gray 300x300 square
2. A transparent 100x100 square
3. Another transparent 100x100 square
The key mechanism for creating transparent regions in the shape is
`fill-rule="evenodd"`. This attribute effects pixel colors in the following
way. Pick a pixel and draw an infinitely long line in any direction:
- If the line crosses an odd number of lines, the pixel receives the fill
color. In this fiddle, the infinite line extending from any gray pixel
crossed an odd number of lines -- for example, just the line that is the
perimeter of the gray rectangle.
- If the line crosses an even number of lines, the pixel is transparent.
In this fiddle, the infinite line extending from any transparent pixel
crossed an even number of lines -- for example, the perimeters of the
transparent square and the gray square.
-->
<path
fill="grey"
fill-rule="evenodd"
d="
M 0 0
h 300
v 300
h -300
Z
M 25 50
h 100
v 100
h -100
Z
"
/>
</svg>
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.