Display Image On Text Link Hover CSS Only

后端 未结 6 1548
感情败类
感情败类 2020-12-13 05:53

I have a text link. When the user hovers over the text link, I want an image to be displayed elsewhere on the page. I want to do this using css. I thought it could be done s

6条回答
  •  佛祖请我去吃肉
    2020-12-13 06:24

    CSS isn't going to be able to call other elements like that, you'll need to use JavaScript to reach beyond a child or sibling selector.

    You could try something like this:

    Some Link
    

    then...

    a>div { display: none; }
    a:hover>div { display: block; }
    

提交回复
热议问题