I recently asked myself a question, does anyone use the pseudo-class
:active
when designing a UI to improve user interaction?
I have never really paid attention to this pseudo-class before (well, I prescribe it in LO / HA and prescribe), but one day I spied how it is used when creating
tabs on SimpleBits and once again made sure that everything ingenious is simple :-)
The bottom line is that when you click on a navigation link to go to another section, for example, for
:active
, this link is assigned the same styles as for the active state. It turns out an interesting effect at the stage of starting to load the page. In sum, with a fairly logical and lightweight markup, it looks like an almost instantaneous transition of a tab to the “you are in this section” state.
In my opinion, a rather curious use, because I don’t remember the use of this pseudo-class anywhere else.
Naturally, some problems may arise when, for example, the user stops loading the page, or, as I recall, in the old version of IE, when the link was turned back, the links remained active, but how often can such situations occur? And is this a good enough reason not to use such an interface overclocking?
PS It would be interesting to hear comments, links to other examples of implementation, based on this trick, or to articles on a similar topic. :)