html5 - display specific div on hover? using css and html only -
I want to show the second HTML code: Style Use the adjacent sibling selector Demo: div (in HTML) with
div Hover over the anger tag on the cursor.
& lt; A & gt; Hover over me & lt; / A & gt; & Lt; Div class = "forget" & gt; Sdjfg & lt; / Div & gt; & Lt; Div class = "dikha" & gt; The content shown on the hover & lt; / Div & gt;
div {display: none; } A: hover & gt; Div: nth-child (2) {display: block; Background color: red; Height: 250px; Width: 960px; }
~ need to . Besides, the div you want to show is the third child, not the second (because
is the first).
div {display: none; } A: hover ~ div: nth-child (3) {display: block; Background color: red; Height: 250px; Width: 960px; }
Comments
Post a Comment