css selector regexp css选择器 正则表达式 css 参考手册
jQuery 选择元素 a.text-success, a.text-danger, a.text-primary, a.text-info
$("a[class^=text-]")
css selector regexp css选择器 正则表达式
Selectors
This section is non-normative, as it merely summarizes the following sections.
A Selector represents a structure. This structure can be used as a condition (e.g. in a CSS rule) that determines which elements a selector matches in the document tree, or as a flat description of the HTML or XML fragment corresponding to that structure.
Selectors may range from simple element names to rich contextual representations.
The following table summarizes the Selector syntax:
| Pattern | Represents | Description | 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 selectors | 2 |
| E[foo="bar"] | an E element whose "foo" attribute value is exactly equal to "bar" | Attribute selectors | 2 |
| E[foo~="bar"] | an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar" | Attribute selectors | 2 |
| E[foo^="bar"] | an E element whose "foo" attribute value begins exactly with the string "bar" | Attribute selectors | 3 |
| E[foo$="bar"] | an E element whose "foo" attribute value ends exactly with the string "bar" | Attribute selectors | 3 |
| E[foo*="bar"] | an E element whose "foo" attribute value contains the substring "bar" | Attribute selectors | 3 |
| E[foo|="en"] | an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en" | Attribute selectors | 2 |
| 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 |
| E:nth-of-type(n) | an E element, the n-th sibling of its type | Structural pseudo-classes | 3 |
| E:nth-last-of-type(n) | an E element, the n-th sibling of its type, counting from the last one | Structural pseudo-classes | 3 |
| E:first-child | an E element, first child of its parent | Structural pseudo-classes | 2 |
| E:last-child | an E element, last child of its parent | Structural pseudo-classes | 3 |
| E:first-of-type | an E element, first sibling of its type | Structural pseudo-classes | 3 |
| E:last-of-type | an E element, last sibling of its type | Structural pseudo-classes | 3 |
| E:only-child | an E element, only child of its parent | Structural pseudo-classes | 3 |
| E:only-of-type | an E element, only sibling of its type | Structural pseudo-classes | 3 |
| E:empty | an E element that has no children (including text nodes) | Structural pseudo-classes | 3 |
| E:link E:visited |
an E element being the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited) | The link pseudo-classes | 1 |
| E:active E:hover E:focus |
an E element during certain user actions | The user action pseudo-classes | 1 and 2 |
| E:target | an E element being the target of the referring URI | The target pseudo-class | 3 |
| E:lang(fr) | an element of type E in language "fr" (the document language specifies how language is determined) | The :lang() pseudo-class | 2 |
| E:enabled E:disabled |
a user interface element E which is enabled or disabled | The UI element states pseudo-classes | 3 |
| E:checked | a user interface element E which is checked (for instance a radio-button or checkbox) | The UI element states pseudo-classes | 3 |
| E::first-line | the first formatted line of an E element | The ::first-line pseudo-element | 1 |
| E::first-letter | the first formatted letter of an E element | The ::first-letter pseudo-element | 1 |
| E::before | generated content before an E element | The ::before pseudo-element | 2 |
| E::after | generated content after an E element | The ::after pseudo-element | 2 |
| E.warning | an E element whose class is "warning" (the document language specifies how class is determined). | Class selectors | 1 |
| E#myid | an E element with ID equal to "myid". | ID selectors | 1 |
| E:not(s) | an E element that does not match simple selector s | Negation pseudo-class | 3 |
| E F | an F element descendant of an E element | Descendant combinator | 1 |
| E > F | an F element child of an E element | Child combinator | 2 |
| E + F | an F element immediately preceded by an E element | Next-sibling combinator | 2 |
| E ~ F | an F element preceded by an E element | Subsequent-sibling combinator | 3 |
css 控制文字,超出部分显示...
.overflow-ellipsis {
overflow: hidden;
text-overflow: elllipsis;
white-space: nowrap;
display:inline-block;
}
css 参考手册:
https://github.com/doyoe/css-handbook
css selector regexp css选择器 正则表达式 css 参考手册的更多相关文章
- css selector
文章一: http://www.jb51.net/css/68287.html 去年我学jQuery的时候,曾经做过一点选择器(selector)的笔记,今天是CSS的选择器,以后还有一部分xPath ...
- UI自动化(九)Css Selector
什么是Css Selector? Css Selector定位实际就是HTML的Css选择器的标签定位 工具 Css Selector的练习建议大家安装火狐浏览器后,下载插件,FireFinder 或 ...
- Selenium之Css Selector使用方法
什么是Css Selector? Css Selector定位实际就是HTML的Css选择器的标签定位 工具 Css Selector的练习建议使用火狐浏览器,下载插件,FireFinder.Fire ...
- Xpath 和Css Selector使用
Xpath是xml的路径语言,就是通过元素的路径来查找标签元素. Xpath直接在火狐浏览器的firebug中练习,49版本一下的火狐才能用firebug插件. Xpath的使用方法 注://* ...
- selenium之css selector定位
什么是CSS Selector? Css Selector定位实际就是HTML的Css选择器的标签定位 工具 Css Selector的练习建议大家安装火狐浏览器(49及以下版本)后,下载插件Fire ...
- Selenium的Css Selector使用方法
什么是Css Selector? Css Selector定位实际就是HTML的Css选择器的标签定位 工具 Css Selector的练习建议大家安装火狐浏览器后,下载插件,FireFinder 或 ...
- [译文]通过ID, TagName, ClassName, Name, CSS selector 得到element
致谢原文: <http://xahlee.info/js/js_get_elements.html> 通过ID得到element: Document.getElementById(id s ...
- Selenium - CSS Selector
Selenium - CSS Selector http://www.cnblogs.com/bugua/archive/2012/08/16/2641647.html 昨天我练习了用CSS(即层 ...
- Scrapy学习系列(一):网页元素查询CSS Selector和XPath Selector
这篇文章主要介绍创建一个简单的spider,顺便介绍一下对网页元素的选取方式(css selector, xpath selector). 第一步:创建spider工程 打开命令行运行以下命令: sc ...
随机推荐
- S3C2440—4.时钟系统
文章目录 一.S3C2440时钟体系介绍 1.总线与时钟 2.时钟来源 3.选择时钟 4.产生时钟 5.流程 二.如何配置时钟源 1.设置FCLK频率寄存器 MPLLCON 2.设置分频HDIV.PD ...
- C++11 shared_ptr智能指针(超级详细)
在实际的 C++ 开发中,我们经常会遇到诸如程序运行中突然崩溃.程序运行所用内存越来越多最终不得不重启等问题,这些问题往往都是内存资源管理不当造成的.比如: 有些内存资源已经被释放,但指向它的指针并没 ...
- SoutceTree用户名或者密码输入错误解决方案
soutceTree在拉取代码时候需要输入账户名或者密码,如果一时输入错了,可以这样修改: 1.找到这个目录:C:\Users\Administrator\AppData\Local\Atlassia ...
- Python环境变量配置
第一步:下载Python安装包 在Python的官网 www.python.org 中找到最新版本的Python安装包,点击进行下载,请注意,当你的电脑是32位的机器,请选择32位的安装包,如果是64 ...
- JDBC中级篇(MYSQL)——在JDBC中如何获得表中的,自增长的字段值
注意:其中的JdbcUtil是我自定义的连接工具类:代码例子链接: package c_increment; import java.sql.Connection; import java.sql.P ...
- rabbitMq内存与磁盘分配问题
在服务器上也可以改变配置文件修改内存 也可以使用命令进行分配: 相对内存:rabbitmqctl set_vm_memory_hgih_waterwmark 0.4 使用时可以把这个0.4替 ...
- OKR工作法读后感
<OKR工作法>把管理思想融入到一则创业故事中,故事细节经过了精心的设计,融入了管理智慧和踩坑填坑经验,每个细节都以小见大,耐人寻味.一千个读者,就有一千个哈姆雷特. 所以这次我不去点评大 ...
- Ubuntu16.04 + OpenCV源码 + Qt5.10 安装、配置
在VMWare中配置安装Ubuntu16.04.没有什么特别的地方,正常安装即可. 安装最新版qt,此时5.10.按照普通QT教程安装(需要勾选gcc),无须sudo,此时不用管OpenCV.地址:h ...
- PENETRATION第一步
PENETRATION第一步 第一次去打靶机,本来都快成功了,电脑蓝屏警告了...(=_=) 靶机下载连接 (https://download.vulnhub.com/admx/AdmX_new.7z ...
- kratos
技术文章 日志库的使用姿势 通过 layout 探索 kratos 运行原理 发版日志 发布日志 - kratos v2.0.5 版本发布 发布日志 - kratos v2.0.4 版本发布