gpt4 book ai didi

css - 选择图片的 alt 属性

转载 作者:行者123 更新时间:2023-12-03 23:31:53 25 4
gpt4 key购买 nike

我有

   <div id="aa">
<img src="." height="17" alt="example1" title="">
<table>
<tbody><tr>
<th></th>
<td></td>
</tbody>
</table>


<img src="." height="17" alt="example2" title="">
<table>
<tbody><tr>
<th></th>
<td></td>
</tbody>
</table>


<img src="." height="17" alt="example3" title="">
<table>
<tbody><tr>
<th></th>
<td></td>
</tbody>
</table>
</div>
我只想选择图像的属性“alt”值“示例 1、示例 2、示例 3”。我怎样才能得到它们。

最佳答案

要选择一些属性使用选择器 img[alt="example1"], img[alt="example2"], img[alt="example3"]

关于css - 选择图片的 alt 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25520199/

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