gpt4 book ai didi

html - 使用 CSS 隐藏基于属性选择器的链接内的图像

转载 作者:行者123 更新时间:2023-11-28 15:41:31 26 4
gpt4 key购买 nike

这是标记:

<p> 
<a href="http://www.domain.com/stack-2015-overflow-648198/">
<img src="link to image">
See also: Stack 2015 and Overflow Review </a>
</p>

内容由 AJAX 加载,但我认为它仍应使用 CSS 设置样式。这是我的 CSS:

a[href*="www.domain.com"] img { display: none; }

但它不起作用。我错过了什么?

最佳答案

我已经使用 CSS 很长时间了,但我从未见过这样的东西。您应该将类​​或 ID 应用于 anchor 标记,然后将其引用为:

#anchorId>img {
display: none;
}

关于html - 使用 CSS 隐藏基于属性选择器的链接内的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37175544/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com