gpt4 book ai didi

css - css中 "*="和 "="的区别

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

CSS 中的“*=”和“=”有什么区别?

例如

a[href=#team]

a[href*=#team]

最佳答案

引用 CSS 选择器级别 3 规范:

[att=val]

Represents an element with the att attribute whose value is exactly "val".

[att*=val]

Represents an element with the att attribute whose value contains at least one instance of the substring "val". If "val" is the empty string then the selector does not represent anything.

引用:

关于css - css中 "*="和 "="的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25527404/

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