Tagged “hover”
In Praise of the Unambiguous Click Menu (on CSS-Tricks)
Mark Root-Wiley explains why navigation menus that appear on click rather than hover are better.
I like the fact that it calls out that:
When you first make this change, it’s true that some visitors might still expect hover menus. They may even say they prefer them if you ask.
But then goes on to provide some rationale (ammunition?) from various big guns on why click menus are better.
From the US Web Design System:
Avoid using hover to expand dropdown lists. Hover is difficult for some users and won’t work on touch screens. Dropdowns should expand on click or with keyboard navigation.
From popular frontend framework Bootstrap:
What it really boils down to is user intent. The purpose of a hover state is to indicate something is clickable (underlined text). The purpose of a click is to actually do something, to take an explicit action. Opening a dropdown is an explicit action and should only happen on click.
(via @jamesmockett)
4 Ways to Animate the Color of a Text Link on Hover | CSS-Tricks
Let’s create a pure CSS effect that changes the color of a text link on hover – but slide that new color in instead of simply swapping colors.
Katherines post explores four different techniques to achieve the effect, and their comparative pros and cons with regard to accessibility, performance, and browser support.
Technique 4, which uses a CSS transform
seems to be the most flexible, best-performing and has best cross-browser support, however because it requires adding a semantically redundant <span>
into the anchor I would use it sparingly rather than on all links by default.
Fading out siblings on hover in CSS (by Trys Mudford)
Here’s a nice CSS-only hover technique from Trys Mudford incorporating scale transforms, opacity transitions and mouse pointer events.
See all tags.