What does quot;iquot; mean in a CSS attribute selector?(“我是什么意思?在 CSS 属性选择器中是什么意思?)
问题描述
我在 Google Chrome 用户代理样式表中找到了以下 CSS 选择器:
I have found the following CSS selector in the Google Chrome user agent stylesheet:
[type="checkbox" i]
i
是什么意思?
推荐答案
在评论中提到,它是用于不区分大小写的属性匹配.这是 CSS 选择器级别 4 中的新功能.
As mentioned in the comments, it is for case-insensitive attribute matching. This is a new feature in CSS Selectors Level 4.
目前它在 Chrome 49+、Firefox 47+、Safari 9+ 和 Opera 37+* 中可用.在此之前,它仅在 Chrome 39 前后的 Chrome 用户代理样式中可用,但可以通过设置实验功能标志来启用 Web 内容.
Presently it is available in Chrome 49+, Firefox 47+, Safari 9+, and Opera 37+*. Prior to this it was only available in the Chrome user-agent styles starting around Chrome 39, but could be enabled for web content by setting the experimental features flag.
* Opera 的早期版本也可能支持它.
* Earlier versions of Opera may also support it.
[data-test] {
width: 100px;
height: 100px;
margin: 4px;
}
[data-test="A"] {
background: red;
}
[data-test="a" i] {
background: green;
}
Green if supported, red if not:
<div data-test="A"></div>
如果浏览器支持此功能,上面的方块将是绿色的,如果不支持,则为红色.
The above square will be green if the browser supports this feature, red if it does not.
这篇关于“我"是什么意思?在 CSS 属性选择器中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“我"是什么意思?在 CSS 属性选择器中是什么


- Flexslider 箭头未正确显示 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01