How to hide an anchor tag by href #id using css

后端 未结 6 2233
刺人心
刺人心 2021-02-14 06:08

I have different anchor tags with href=#ids and I need to hide them using a general css rule for all of them,

Content xxxxxxxxx Table 1&         


        
6条回答
  •  长情又很酷
    2021-02-14 06:25

    Try using a[href*="#"] {display: none;} This selectors identifies a # in the href attribute of an anchor and if found it applies the style

    You can use it in another way such as header a[href*="#"] {display: none;} So you don't mess all the anchors on the site!

提交回复
热议问题