如何使用css隐藏href #id的锚标签 [英] How to hide an anchor tag by href #id using css
本文介绍了如何使用css隐藏href #id的锚标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有不同的锚标记与href =#ids,我需要隐藏他们使用一般的css规则为所有他们,
Content xxxxxxxxx< a href =#tab1>表1< / a> .Content xxxxxxxxxxxx< a href =#tab2>表2< / a&
我试图使用这样的东西:
#wrap a ='#tab1'{
display:none;
}
任何想法如何做?
<为什么不为你的锚点创建一个CSS类并使用该类隐藏它们?
> < a href =#tab1class =hiddenTab> foo< / a>
在您的CSS中:
a.hiddenTab {visibility:hidden; display:none;}
你想隐藏的所有定位点只使用class = hiddenTab'
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 <a href="#tab1">Table 1</a>.Content xxxxxxxxxxxx <a href="#tab2">Table 2</a>
I was trying to use something like this:
#wrap a='#tab1'{
display:none;
}
Any idea how to do it?
解决方案
Why not just create a CSS class for your anchors and hide them using that class?
<a href="#tab1" class="hiddenTab">foo</a>
And in your CSS:
a.hiddenTab {visibility:hidden; display:none;}
All the anchors you'd want to hide would just use "class='hiddenTab'"
这篇关于如何使用css隐藏href #id的锚标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文