Domanda

Not that I want to promote buydomains.com (actually I despise their business model) but need to show it to illustrate my question, sorry.

I came across this website on which when you resize your browser window's width up/down, the elements' get slowly resized up/down (I'm guessing via JavaScript), until they seem to fit in an optimum way:.

For instance, resizing up the browser width, you can see that the "Researchhighlights" search box's width progressively reduces until the below elements fit on the same line:

enter image description here

enter image description here

enter image description here

I'm used to CSS responsive design where elements are resized and re-arranged instantly when certain break points are reached, so I'm wondering whether this method is an alternative to CSS responsive design (and if so what the pros/cons are) by letting JavaScript figure out the optimum elements' width.

Is there a technical reason behind this implementation?*

**since JavaScript has the capability of doing such processing instantly the fact that elements are re-sized slowly definitely seems to be some sort of aesthetic decision (otherwise why make people wait if you can do things faster), however there might still be some technical reason behind it.*

È stato utile?

Soluzione

First of all, the same effects can be achieved using CSS, so this is not a JavaScript vs. CSS-based responsive design situation.

The decision to slow down the transitions is purely a design decision - there are no technical limitations on doing it instantly.

In my opinion (and experience), slow transitions are more annoying than aesthetically pleasing, especially on a "utility" website. Also, a screen resize event is relatively rare - most users do not resize a screen during their visit. When users do resize it (for example, by turning a tablet), they expect an instantaneous adjustment. I see no reason not to meet their expectations.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top