From 7a2c4c1c9aded50fb64cd6d3e94262721cee6720 Mon Sep 17 00:00:00 2001 From: Ece <43401712+ecemac@users.noreply.github.com> Date: Thu, 22 Nov 2018 06:39:24 +0300 Subject: [PATCH] Added more info on :hover (#22932) --- guide/english/css/hover-selector/index.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/guide/english/css/hover-selector/index.md b/guide/english/css/hover-selector/index.md index bac7fca4c6..c32a6dd955 100644 --- a/guide/english/css/hover-selector/index.md +++ b/guide/english/css/hover-selector/index.md @@ -37,6 +37,20 @@ button:hover { In the example above, the button's normal styling is white text on a green button. When a user hovers over the button with their mouse the rule with the `:hover` selector will become active and the button's style will change. +You can also use the hover selector on an element to affect another element. + +```css +button { + color: white; + background-color: green; +} + +button:hover span{ + color: green; +} +``` +In the example above, when a user moves their mouse over the button element, the span element's color would change to green. + #### More Information: MDN `:hover` Docs