Jump to content

Is it possible to set up a mask in the browser?


RIRedinPA

Recommended Posts

I'm trying to figure out a way to do this:

 

say I have a fixed position element (div) that's 300x 300 pixel, 100px off the left margin of the window, 100px off the top. Beneath that I have another div whose height will be random based on the number of images loaded into it. Is there a way to only have the images that fall into the 300x300 area of the fixed div load, while loading some default image for the other images and then, as the user scrolls and new images fall within the 300x300 area they subsequently load. Similar to using a mask in Photoshop or Flash, think of Google's new image search results page as an example.

 

Hard coding or framework doesn't make a difference how the result is achieved.

 

(I don't think there is a need to have a 300x300 fixed position element, you can just declare those points in the JS, I was using that to help clarify the example.)

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.