<a href="#">Try hovering over me!</a>`hover` CSS media feature / notebook
`hover` CSS media feature
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
/* default hover effect */
a:hover {
color: black;
background: yellow;
}
@media (hover: hover) {
/* when hover is supported */
a:hover {
color: white;
background: black;
}
}