Refreshing an embedded image using HTML [duplicate] - css

This question already has answers here:
Refresh image with a new one at the same url
(23 answers)
Auto refresh images in HTML
(4 answers)
Closed 4 years ago.
I have a screenshare at work but the layout is wack.
I want to simplify it to full screen and nothing else.
Basically it screenshots the host computer screen every millisecond and streams a jpg via http://10.50.0.173:7070/ScreenTask.jpg?rand= after the equals is the jpg number.
All I want is a bit of code that refreshes the page or image every millisecond.
I have written literally nothing but the bare basics:
<html>
<body>
<img src=http://10.50.0.173:7070/ScreenTask.jpg?rand=" alt="screenshare">
</body>
</html>
All this outputs is the image, if I refresh the page I will get the new image but obviously this requires a manual page refresh, not an automatic image refresh.

Related

Is there a (CSS) filter to cut out the outlines of an image on top of another image? [duplicate]

This question already has answers here:
masking image with CSS
(2 answers)
Closed 1 year ago.
I've got two images on top of my webpages. One is a rectangle-shaped JPG file banner, the other is a wave-shaped SVG vector file. Similar to how Adobe Illustrator has its pathfinder tool to cutout shapes: Is there any way to invert-cutout the wave from the banner, using any sort of CSS filter or blend mode or something?
The reason I want to do this using CSS is because it would only require me to change one HTML template for the banner. Otherwise I would have to edit 125+ unique banner image files. Editing the wave file is not a problem if needed, as I would only need it once for the banner template.
Example banner:
Example wave:
Desired result:
(the banner should look like this)
I think you can use clip-path
https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path

How are they making this instagram respond like div blocks

My experience so far has just been getting an instagram feed to embed with set columns and rows, but I was looking at beardbrand.com, and they have their instagram feed set to be responsive and change column and row configuration based on screen size. Has anyone seen this before, or know how the code is written to make it responsive in this form, rather than the images simply shrinking and expanding based on screen size?

Big responsive background image - which resolution? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm developing a website for a photographer. The landing page is made of a big responsive background image and a menu. I know how to make a responsive background image, but the question I have is : Which resolution should the image be? Should I get 2-3 different sizes and apply them depending on the device width or one which I would reduce? Which should be the biggest size for the biggest screens? Thanks.
Focus more on compression and format than resolution. If you use caching and compression on the server you won't need to decrease the resolution of the image. As for this question:
Should I get 2-3 different sizes and apply them depending on the device width or one which I would reduce?
Use the same image for all screens. Also note that changing the image size attribute doesn't decrease load times, it just resizes the image after downloading it
I'm not sure I agree with Random User 100%. I would, if possible, use differently sized images for different media sizes. Since theres a huge range of screen sizes, and also a huge range of bandwidth limitations, If you can serve the smallest possible image size for the screen, it will have a large effect on load times. While Random User may be correct about compression and the size attribute, BUT caching won't help if users are loading your page for the first time. A high-res image loading on a 3G connection is gonna hang up your page load, one way or another.
Currently there isn't wide support natively in browsers for responsive images (yet), such as the srcset attibute or the picture element, but there are Javascript alternatives. The one I use is Interchange, part of the Foundation framework.
You do want to be careful that you are not trading image loading savings for Javascript loading losses. However, in general, javascript libraries are fairly small, and the additional HTTP request for a JS file will usually be outweighed by the savings gained by not loading a massive image on a mobile device. I would recommend combining and compressing your Javascript into a single file, but thats another thing altogether.

How dynamic is LESS CSS?

I am writing this with no experience of using LESS. However I just wanted to know that if I have a LESS stylesheet for a page and a client viewing the page say changes the size of the page, can I have custom rules which sets the pixel value of an element if the page is resized to say less than 50% or can dynamically change the font of a heading on page resize?
The answer to your question is: YES
:)

asp.net hide display while loading many images

I'm developping a card game.
I have an ASP.NET page with some 52 small images (the cards), say 300 Kbytes in total.
When the page loads for the 1st time the effect is ugly: User can see each card being loaded in turn.
Moreover, only some images are to be displayed after page loads.
Hence the big issue:
I can't make the images hidden from ASP.NET since if hidden they are simply NOT rendered within the "dynamically generated" aspx page!
And of course when I use a js function fired from windows.onload event, then the user will see all the images before I can hide them in javascript!
The dirty way would be to create a Div that would be displayed in front of all other objects since I use absolute positioning.
I'm quite sure you all gurus, you have better ideas!...
If all of the images are enclosed in a single element (say, a div) then you can set its CSS to display: none by default so that even during page rendering it won't show to the user. Then, when all of the content is loaded, display it to the user. Something like this:
<style type="text/css">
#imageContent { display: none; }
</style>
<div id="imageContent">
<!-- your images are here -->
</div>
<script type="text/javascript">
// assuming jQuery because, well, come on
$(document).load(function() {
$('#imageContent').show();
});
</script>
Now, this makes no guarantees that it won't take a long time for the images to load, resulting in the user not seeing any of them for a while. And if some of them fail to load then I'm not sure what would happen. I imagine the event will still fire once the DOM gives up on trying to load the failed resources.
Naturally, you'll want to style around all of this so that the transition from no images to all images is a smooth user experience. If it takes a few moments then the user may already be interacting with the page when the images suddenly load and move stuff around (I haven't seen your page, so maybe that's not an issue.)
So you'll want to test something like this one a known slow connection or with known broken images to see how it all behaves.
I have a small idea of how such things oftenly done in different jQuery libraries.
The idea is to pack all the cards in ONE image and show different patrs of the image by setting this image as a background of the div and change offsets.
Google does so, for instance. Take a look:
http://www.google.ru/images/nav_logo83.png
This is the elements used at SERP

Resources