Selenium学习笔记21_CSS Selector
2017-10-23 15:21
316 查看
翻译自: 英文原文链接
The following table summarizes the Selector syntax:
The following table summarizes the Selector syntax:
模式 | 含义 | 描述 | CSS Level |
---|---|---|---|
* | any element | universal selector | 2 |
E | an element of type E | Type selector | 1 |
E[foo] | an E element with a “foo” attribute | Attribute selector | 2 |
E[foo=”bar”] | an E element whose “foo” attribute value is equal to “bar” | Attribute selector | 2 |
E[foo~=”bar” | an E element whose “foo” attribute value is a list of whitespace-separated values, one of which is equal to “bar” | Attribute selector | 2 |
E[foo^=”bar”] | an E element whose “foo” attribute starts with “bar” | Attribute selector | 2 |
E[foo$=”bar”] | an E element whose “foo” attribute ends with “bar” | Attribute selector | 3 |
E[foo*=”bar”] | an E element whose “foo” attribute value contains the substring “bar” | Attribute selector | 3 |
E[foo | =”en”] | 匹配所有att属性具有多个连字号分隔(hyphen-separated)的值、其中一个值以“val”开头的E元素,主要用于lang属性,比如“en”、“en-us”、“en-gb”等等 | Attribute selector |
E:root | an E element, root of the document | Structural pseudo-classes | 3 |
E:nth-child(n) | an E element, the n-th child of its parent | Structural pseudo-classes | 3 |
E:nth-last-child(n) | an E element, the n-th child of its parent, counting from the last one | Structural pseudo-classes | 3 |
相关文章推荐
- 基于《Selenium 2自动化测试实战》的学习笔记(6)—— CSS 定位
- 学习笔记:css selector
- html及css学习笔记_13_css三种选择器(selector)
- WEB标准布局(DIV+CSS)学习笔记(二)-- DIV的布局基础
- CSS 学习笔记
- Selenium2 Python 自动化测试实战学习笔记(八)
- CSS学习笔记:长度值和颜色
- HTML/CSS基础知识学习笔记
- 【菜鸟C++学习笔记】21.引用
- 7-21 学习VB.net的笔记
- 10月27日 css学习笔记
- 对表单和数据表格应用样式--Css学习笔记(六)
- 前端学习笔记(四)——css
- python之 前端HTML/CSS基础知识学习笔记
- CSS学习笔记二
- 韩顺平_轻松搞定网页设计(html+css+javascript)_第25讲_js系统函数_js函数调用方式_学习笔记_源代码图解_PPT文档整理
- HTML&CSS基础学习笔记1.28-给网页添加一个css样式
- css 学习笔记
- CSS学习笔记之框模型
- css flexbox 学习笔记(一)