Forum Moderators: open

Message Too Old, No Replies

jQuery multiplication

         

geoffb

8:03 pm on Mar 23, 2015 (gmt 0)

10+ Year Member



Just wondering if I can do this:

I will have an image that has an overlay top and bottom that is slanted to make the image appear to run up in an angle.

I would then like to run a function that adds 1px high white lines evenly spaced out (about 8px) the entire length of the image, like a sort of screen overlay.

So the first line would run right across the width of the image 8px from the top, then the next 16px from the top and so on.

So I need to:

1. use .height to get the current height of the image container which will be based on the image size
2. Repeat a single pixel full width line/border every 8px until the end when the loop should finish

Any pointing in the right direction would be great.

Thanks

Fotiman

2:04 pm on Mar 28, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Would the purpose of this be to act as a watermark to prevent people from getting the unmodified image? Or is your intention simply to decorate the image, but you don't care if the user can get access to the unmodified image?