-
February 28th, 2003, 09:12 PM
#1
Clipping an image
Using Javascript and CSS, I am trying to create an animation where a picture (jpg) is displayed by an expanding rectangle from it's center point.
I haven't gotten to the animating part because I can't get the clip and overflow properties to work at all in IE 6 (I'm focusing on one browser for now - I'll work on compability after I've gotten the basics nailed down). By "not working", I mean there is no noticable change to the image when I try to set the clip rectangle in via javascript. (Nor was there any when it set it statically in a stylesheet, for that matter.)
Are overflow/clip supported by IE6? Am I missing some key bit of knowledge about clipping and bounding boxes?
The code is a bit messy right now (as it's under development), but you can look at it here:
http://www.codemastershawn.com/class...4/project4.php
I'm trying to set the clip rectangle in the function clipPicIn().
Thanks,
- Shawn
MCP, VB6: Desktop Apps
[ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
Unless otherwise stated, all sample code provided is UNTESTED.
http://www.codemastershawn.com
-
March 3rd, 2003, 06:38 AM
#2
The easiest way I know if is Transitions using the Square iris.
Look here DHTML Objects and goto the IMG item, then look at filters.
-
March 7th, 2003, 04:13 PM
#3
Thanks for the tip, but I am looking explicitly to use the clip functionality of the CSS standard. This code needs to run in all browsers, not just IE.
(In other words, I'm not looking for the "easy" way - I'm looking for the "proper" way.)
- Shawn
MCP, VB6: Desktop Apps
[ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
Unless otherwise stated, all sample code provided is UNTESTED.
http://www.codemastershawn.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|