ASP.NET use Ajax to add scrollbar to the picture - asp.net

I need to add a scroll to "one" picture and load it asynchronously.. with the help of scroll bar...
The picture is bigger than the div area so need to scroll. I can use "overflow: scroll " but it loads the whole picture whereas my requirement is to load the picture as a user moves the scrollbar.
thanks

The would help to load a page with multiple large images in the manner you are describing
Lazy Load plugin
It isn't built for one giant sized image which is what you want. However it should be an easy matter to slice you image into reason sized regions or tiles and use this loader.
Out of interest really - here is a utility that will automatically slice up images to protect them from theft. I occurs to me that you could combine the two if you didn't fancy manually splitting the image - or just wanted to be a bit of a coding hero. In any case the link shows that sliced and recombined images look perfectly fine. Users can't tell if it's done right.

Related

Using LazySizes to Lazy Load Images but Want to Maintain the Space Around the Image when Loading In

I am using LazySizes to lazy load images. I am using Bootstrap as a framework for the HTML & CSS but am having trouble trying to allow the space around the image be maintained while the image loads in, so the image doesn't appear to fill in the space between the text it surrounds. Almost like how an image would appear to regularly load on the page, with the space maintained around it, while it loads in, when you're not lazyloading.
I have already tried specifying the width and height as well as added the width specification to the data-srcset, the HTML of the image, and used data-sizes="auto", but this isn't helping. My thought is adding a CSS customization so the space of the image is maintained before it loads but I am wondering if there's a better way to do this?
My solution was to add an src= attribute of a lower quality image to allow something to maintain the space until the image lazyloaded in. This way it appears to maintain the same behavior as an image that is loaded in without lazyloading.

CSS - does reusing the same image perform like two separate images

I have an image I want to set as a background, with background-attachment: fixed element, but I'd like to set it on two divs, which scroll at different speeds. So as you scroll it 'appears' that both divs are giving little peeks at the same image hiding behind it all. However, it would actually need to be two separate divs with the same image set as the background.
I'm curious, will using the same image twice be less clunky than two separate images? I know the render will be relatively the same, but in terms of the page loading, will It save some performance?
Yes it will, if the URL is exactly the same.
Browsers will cache media resources if the URL is the same, so using the same image in two places is better than using two separate images.

scroll pic with fixed position

Good day, I'm having a problem achieving scrolling image with fixed position.
I have done half way of achieving what i wanted by creating two background images with fixed positions, (1 is normal, 2 is gray scaled).
once i upload it into wp site, they stay in background + they stay positioned at the top left of the page, (even after i specify their location, but images fixed to the view port, which what i don't want).
here's the link of my code: [https://jsfiddle.net/rf759hw3/1/][1]
now what i wanted to achieve is:
1 - keeping images in specified position while scrolling.
2 - once i reach to page section which has image, only then scrolling start from greyscale, to original (not while i scroll the page itself).
i found a website which achieve same concept which I'm looking to achieve:
http://tnc.org.cn/#TNC#events (the river section)
but their heavily filled with JS with many dependencies, and i am not yet familiar with js btw.
after days of research i found something which can achive my purpose using js called "Magic Scroll" , but i couldn't find an example which suites my purpose to achieve, which is keeping my images in position as i scroll and overlap one another when i reach their section , any advice or help is much appreciated. Thanks

color of scrollbars within the page

I need help. My main page has a long table that will typically be approximately 2 screens "tall" (assuming a 1024x768 browser window).
I want
the user to be able to browse that table up and down, while always having a set of control buttons available in the currently visible portion of the page.
AND
to retain control over the color scheme of all elements on the page.
The problem is that both solutions I could think of that address the first point (using an overflown div or a frame) involve scrollbars that I cannot style. (At least on Firefox they will invariably be gray.)
I cannot implement a "pager" which breaks the data on the table into chunks which are served one at a time (eg, having a "next 40 results" link at the bottom). The user needs to refer to the full table to find and compare multiple rows throughout the table.
What are my options? My head hurts when I think of moving this entire page to Flash for this reason...
thanks in advance...
i would use jquery and a scrollable div.
Here are some resources to get you started.
http://www.switchonthecode.com/tutorials/using-jquery-slider-to-scroll-a-div
http://flowplayer.org/tools/demos/scrollable/vertical.html
http://logicbox.net/jquery/simplyscroll/vertical.html
Don't change the styling of scrollbars unless you really know what you're doing! However, if you understand the usability implications (and try to make them as user-friendly as possible), try the following options:
If you use jQuery, try jScrollPane.
If you use MooTools, try MooScroll or MooScroller.
The following StackOverflow threads might also be useful:
How do I change the browser's scrollbar colours using CSS?
What's the deal with CSS and scroll bars?
How can one use scroll bar images?

Background image shows through briefly

I have a site that uses a large centered background image, which naturally loads a tad slower than the other elements on the page. For the most part this works okay, but there is also a repeat-x background image that covers the background for large monitors. The only problem is that this smaller file loads first and flashes briefly before the large image loads fully. Is there a way to have the large image load first so it is in place before the repeating background image loads? Thanks!
I don't know whether there is a way to accomplish that but you can use either javascript or jquery to change your dom elements show priority.
There's no way using strictly css to absolutely control the order images load.
The browser will try to download the images in the order they're listed in the css file, so putting your large background iage first will help, but the download time is gonna make it a moot point more than likely.
You could load the larger background via javascript once the rest of the DOM has loaded if it's worth going that far.
I figured out the answer to my own question: Instead of repeating the whole pattern of the upper body, I used only the pattern portion that is where the main content is. This loads quickly and looks natural behind the content while the large image loads. Thanks Aaron for the reply.

Resources