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 ...
随机推荐
- (五)Linux之文件与目录管理以及文本处理
Linux之文件与目录管理 目录 Linux之文件与目录管理 前言 绝对路径与相对路径说明: 一.目录常用命令 常用处理目录的命令: 切换目录 cd 显示当前路径 pwd 查看目录下文件 ls 创建目 ...
- 题解 P6271 [湖北省队互测2014]一个人的数论
通过这道题学了伯努利数,写篇题解推一下 题目 先推一下式子 \[\sum_{i=1}^ni^d[gcd(i,n)=1] \] \[\sum_{i=1}^{n}i^d\sum_{k|i}\sum_{k| ...
- 十二:Servlet3.0的注解
1.@WebListener注解 表示的就是我们之前的在xml中配置的 <listener> <listener-class>ListenerClass</listene ...
- mfc HackerTools防止程序双开
来自:https://github.com/TonyChen56/HackerTools 1 HANDLE hMutex = CreateMutexA(NULL, FALSE, "GuiSh ...
- C# 计时器用法(DispatcherTimer、System.Timers.Timer、System.Threading.Timer)
首先,我觉得三种计时器最大的区别是:DispatcherTimer触发的内容会直接转到主线程去执行(耗时操作会卡住主线程),另外两个则是在副线程执行,如果需要修改界面,则需要手动转到主线程. Disp ...
- Ubuntu的build-essential有什么作用
Ubuntu缺省情况下,并没有提供C/C++的编译环境,因此还需要手动安装.但是如果单独安装gcc以及g++比较麻烦,幸运的是,Ubuntu提供了一个build-essential软件包.查看该软件包 ...
- 【ArcEngine】多用户同时编辑同一个版本数据的解决方法
ArcMap或ArcEngine中,使用多个用户同时编辑default版本的时候,问题就来了,StopEditing 错误信息如下 FDO_E_VERSION_REDEFINED -214721714 ...
- hive -- 外部表、内部表、临时表
1.外部表 关键字:EXTERNAL 外部表创建时需要指定LOCATION 删除外部表时,数据不被删除 CREATE EXTERNAL TABLE page_view(viewTime INT, us ...
- Redis常用技术
Xml配置: <?xml version='1.0' encoding='UTF-8' ?> <!-- was: <?xml version="1.0" e ...
- Servlet、ServletContext与ServletConfig的详解及区别
Servlet.ServletContext与ServletConfig的详解及区别 一.Servlet详解 Servlet是一个interface,全局限定名:javax.servlet.Servl ...