我有不同的 href=#ids anchor 标记,我需要使用通用的 css 规则来隐藏它们,
Content xxxxxxxxx <a href="#tab1">Table 1</a>.Content xxxxxxxxxxxx <a href="#tab2">Table 2</a>
我正在尝试使用这样的东西:
#wrap a='#tab1'{
display:none;
}
知道怎么做吗?
最佳答案
尝试使用属性选择器:
a[href='#tab1']{ display: none }
或者甚至简单
[href='#tab1']{ display: none }
关于html - 如何使用 css 通过 href#id 隐藏 anchor 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9165479/