New google images as they float correctly

Has anyone seen a new image search on Google. He manages to make the images float in the area. Images fit right into them, grouping them by size.

Frog pictures

I think there are two ways to do this:

  • Scenarios using some kind of rule including the width and height of these images
  • Css rule for creating images.

In a scripting scenario, we can use a maximum width of 1000 pixels and then group the images to fill this 4 times for our 4 lines of images.

The Css rule is to make images float as well as order them.

Does anyone have any other ideas on how this will work?

+5
source share
2 answers

They resize images using canvas js. Then set the width li, height, and then add overflow hidden. You can also get the same result if you set the width on all your images in css img.myimg {width: 70px}. I don’t think it will take longer to make the page using js code.

+1
source

I think google does all these stafs on the server: try resizing the window - it will reload into sercond with the resized images. On the other hand, I found a canvas element that could also be used to resize uploaded images using js

+1
source

All Articles