CSS- target text links with bottom border on hover, but image links with no border

前端 未结 9 817
离开以前
离开以前 2021-02-08 11:54

I\'d like to be able to target text links in CSS with border-bottom on hover, but have all links that are images not have a border on hover. So:



        
9条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-08 12:27

    This actually seems to be a pretty difficult problem. Do you have any ability to change the CMS's code? It becomes easy if you can do something like wrap a around any text inside links (and leave images outside of those). Then all you have to do is target #sidebar a:hover span to have the border.

    If you can't change the code, I'm not sure if this is possible. I sure can't come up with anything.

提交回复
热议问题