gpt4 book ai didi

html - 如何定位 css3 中除第一个标签以外的所有标签?

转载 作者:太空狗 更新时间:2023-10-29 12:25:24 28 4
gpt4 key购买 nike

这是我的html

<div class="app-screens">
<a href="./includes/images/taaid/Screenshot_2013-12-08-15-00-37.png" data-title="TA AID" data-lightbox="taaid">
<img src="./includes/images/taaid/Screenshot_2013-12-08-15-00-37.png"/>
</a>
<a href="./includes/images/taaid/Screenshot_2013-12-08-15-02-16.png" data-title="TA AID" data-lightbox="taaid">
<img src="./includes/images/taaid/Screenshot_2013-12-08-15-02-16.png"/>
</a>
<a href="./includes/images/taaid/Screenshot_2013-12-08-15-03-38.png" data-title="TA AID" data-lightbox="taaid">
<img src="./includes/images/taaid/Screenshot_2013-12-08-15-03-38.png"/>
</a>
<a href="./includes/images/taaid/Screenshot_2013-12-08-15-06-19.png" data-title="TA AID" data-lightbox="taaid">
<img src="./includes/images/taaid/Screenshot_2013-12-08-15-06-19.png"/>
</a>
<a href="./includes/images/taaid/Screenshot_2013-12-08-15-06-29.png" data-title="TA AID" data-lightbox="taaid">
<img src="./includes/images/taaid/Screenshot_2013-12-08-15-06-29.png"/>
</a>
<a href="./includes/images/taaid/Screenshot_2013-12-08-15-06-45.png" data-title="TA AID" data-lightbox="taaid">
<img src="./includes/images/taaid/Screenshot_2013-12-08-15-06-45.png"/>
</a>
</div>

和我的CSS

.app-screens img:not(:first-child) { 
display: none;
}

我想隐藏除第一个以外的所有 img 标签。但它们仍然显示......有谁知道出了什么问题?

谢谢

最佳答案

.app-screens a:not(:first-child) img { 
display: none;
}

您必须先定位 anchor ,然后再定位图像。

关于html - 如何定位 css3 中除第一个标签以外的所有标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26271113/

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