I am trying to implement the equivalent of the css: "overflow: transparent 50%" property. For example, if I have this:
<div style="border: 1px solid black; width: 200px; height: 200px; overflow: visible;">
<img src="img.png">
</div>
I want the portion of the image displayed in the 200x200 field to be normal. The part of the image that overflows the 200x200 block, I want to be partially transparent. Maybe there are ways to do this by defining four divs on all around the main div? I am not sure how to do this.
+------------------+
| img overflow, |
| 50% transparent |
| +------------+ |
| | normal img | |
| +------------+ |
| |
+------------------+
The width and height of the image are known in advance. Some javascript will be added to the div to allow the image to be moved by dragging and dropping, so the div will act as a viewport, and the image may overflow on either side. Ideally, you need to work in all browsers.