HighDots Forums  

Dragging an image within a CSS clip

alt.html.dhtml alt.html.dhtml


Discuss Dragging an image within a CSS clip in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
az1538
 
Posts: n/a

Default Dragging an image within a CSS clip - 09-12-2008 , 01:09 PM






Hey everyone. Here's what I'm trying to accomplish.

I have an image with the following CSS applied to it:

position: absolute;
clip: rect(0px 245px 330px 0px);
top: -330px;
left: 14px;
cursor: move;

I have a "zoom" button as well. When I click that button, the image
gets replaced with a high res image, but that image stays within the
clip defined above....which is exactly waht I want it to do.

Now I want to be able to click and drag the hires image while at the
same time keeping it within the clip paramaters. Basically I want the
user to be able to drag the "zoomed" image around so they can see the
entire image if they want but the image stays in the clip.

With javascript I can drag the image around the screen, but that's not
what I'm trying to accomplish.

Any help or direction would be greatly appreciated!!

Thanks!
Jeremy

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.