gpt4 book ai didi

jQuery:通过搜索样式 ="font-size: 70%"来匹配元素?

转载 作者:太空宇宙 更新时间:2023-11-03 20:24:23 27 4
gpt4 key购买 nike

如何匹配字体大小为 70% 的所有 a 标签?

<a href="/tag/customersproducts" style="font-size: 70%; text-decoration: none;">customersproducts</a> 
<a href="/tag/dealers" style="font-size: 70%; text-decoration: none;">dealers</a>
<a href="/tag/dealershops" style="font-size: 101%; text-decoration: none;">dealershops</a>
<a href="/tag/dealersvendors" style="font-size: 120%; text-decoration: none;">dealersvendors</a>
<a href="/tag/deliverymethods" style="font-size: 70%; text-decoration: none;">deliverymethods</a>
<a href="/tag/departements" style="font-size: 70%; text-decoration: none;">departements</a>
<a href="/tag/departments" style="font-size: 104.545%; text-decoration: none;">departments</a>

这不起作用:

$('a[style*=font-size:70%]')

这是页面:http://cakeapp.com/tags/all安装了用于测试的 jQuery...

最佳答案

你想要的是一个过滤器:

$('a').filter(function() { return this.style.fontSize == '70%' })

关于jQuery:通过搜索样式 ="font-size: 70%"来匹配元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1790198/

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