hover media feature

Describes the ability of a user to hover over elements on a page.

Possible values

  • Name: hover
  • For: @media
  • Value: none | on-demand | hover
  • Type: discrete

One of the following values.

ValueDescription

none

Indicates that the primary pointing system doesn’t have hover capability (like smart phones or touch screens).

on-demand

Indicates that the primary pointing system does have hover capability, but it requires action on the user’s part. For example, a long press.

hover

Indicates that the primary pointing system has hover capability and can easily hover (like a mouse).

 

Examples

The following declaration indicates that a style sheet applies to devices with hover capabilities.



@media (hover) {
   ...
}

 

 

Show: