Html 是否可以使用href链接显示无? 任何文本或图像
我想使用href的值添加display none 例如:我只想将Html 是否可以使用href链接显示无? 任何文本或图像,html,css,display,Html,Css,Display,我想使用href的值添加display none 例如:我只想将display:none添加到重定向到example.html的所有锚定标记中。所有其他锚定标记应仍然可见 换句话说,我只想隐藏指向example.html的链接 这可能吗?您可以使用以下解决方案,使用: a[href=“example.html”]{ 显示:无; } 任何文本或图像 堆栈溢出是的,这是可能的。通过以下方式进行: a[href=“example.html”{显示:无!重要;} 这将隐藏所有具有“example.h
display:none
添加到重定向到example.html
的所有锚定标记中。所有其他锚定标记应仍然可见
换句话说,我只想隐藏指向example.html
的链接
这可能吗?您可以使用以下解决方案,使用:
a[href=“example.html”]{
显示:无;
}
任何文本或图像
堆栈溢出
是的,这是可能的。通过以下方式进行:
a[href=“example.html”{显示:无!重要;}
这将隐藏所有具有“example.html”值的锚定标记。您可以使用来定位所需的锚定标记
[href="'example.html'"]{display: none;}
你为什么要使用
!重要信息
?有时可能会有一个带有标记且具有css display:block的类,如果没有iImportant,它将无法工作
[href="'example.html'"]{display: none;}
[href="example.html"] {
display: none;
}