- 浏览: 802572 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (360)
- Java (101)
- JPA/Hibernate (10)
- Spring (14)
- Flex/BlazeDS (37)
- Database (30)
- Lucene/Solr/Nutch (0)
- Maven/Ant (25)
- CXF/WebService (3)
- RPC/RMI/SOAP/WSDL (1)
- REST (6)
- TDD/BDD/JUnit (1)
- Servlet/JSP (2)
- AI/MachineLearning (3)
- Resource (1)
- 字符编码 (2)
- OOA/OOPS/UML (5)
- DesignPattern (8)
- 算法与数据结构 (11)
- Web&App Server (13)
- 并发&异步&无阻塞 (7)
- Entertainment (4)
- JavaScript/ExtJS (45)
- CodeStyle&Quality (1)
- svn/git/perforce (8)
- JSON (2)
- JavaScriptTesting (4)
- Others (6)
- RegularExpression (2)
- Linux/Windows (12)
- Protocal (2)
- Celebrities (1)
- Interview (1)
- 计算机语言 (1)
- English (2)
- Eclipse (5)
- TimeZone/时区 (1)
- Finance (1)
- 信息安全 (1)
- JMS/MQ (2)
- XSD/XML/DTD (3)
- Android (4)
- 投资 (3)
- Distribution (3)
- Excel (1)
最新评论
-
qdujunjie:
如果把m换成具体的数字,比如4或者5,会让读者更明白
m阶B树中“阶”的含义 -
java-admin:
不错,加油,多写点文章
关于Extjs的mixins和plugin -
xiehuaidong880827:
你好,我用sencha cmd打包完本地工程后,把app.js ...
ExtJS使用Sencha Cmd合并javascript文件为一个文件 -
KIWIFLY:
lwpan 写道inverse = "true&qu ...
Hibernate中什么时候使用inverse=true -
luedipiaofeng:
good
消除IE stop running this script弹出框
var simple = '.foo'; // Only asking for the class name on the element
var simple = 'div.bar'; // Only asking for the tag/class name on the element
除了下面的Element/Attribute/Pseudo/CSS value选择器外,上面的基本选择器也值得注意,其中div.bar是由两个选择器合成,一是tag选择器div,另一个是class选择器".bar",只需注意".bar"是class选择器, bar不是一个选择器.
Element Selectors:
* any element
E an element with the tag E
E F All descendent elements of E that have the tag F
E > F or E/F all direct children elements of E that have the tag F
E + F all elements with the tag F that are immediately preceded by an element with the tag E
E ~ F all elements with the tag F that are preceded by a sibling element with the tag E
Attribute Selectors:
The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.
E[foo] has an attribute "foo"
E[foo=bar] has an attribute "foo" that equals "bar"
E[foo^=bar] has an attribute "foo" that starts with "bar"
E[foo$=bar] has an attribute "foo" that ends with "bar"
E[foo*=bar] has an attribute "foo" that contains the substring "bar"
E[foo%=2] has an attribute "foo" that is evenly divisible by 2
E[foo!=bar] attribute "foo" does not equal "bar"
Pseudo Classes:
E:first-child E is the first child of its parent
E:last-child E is the last child of its parent
E:nth-child(_n_) E is the _n_th child of its parent (1 based as per the spec)
E:nth-child(odd) E is an odd child of its parent
E:nth-child(even) E is an even child of its parent
E:only-child E is the only child of its parent
E:checked E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)
E:first the first E in the resultset
E:last the last E in the resultset
E:nth(_n_) the _n_th E in the resultset (1 based)
E:odd shortcut for :nth-child(odd)
E:even shortcut for :nth-child(even)
E:contains(foo) E's innerHTML contains the substring "foo"
E:nodeValue(foo) E contains a textNode with a nodeValue that equals "foo"
E:not(S) an E element that does not match simple selector S
E:has(S) an E element that has a descendent that matches simple selector S
E:next(S) an E element whose next sibling matches simple selector S
E:prev(S) an E element whose previous sibling matches simple selector S
E:any(S1|S2|S2) an E element which matches any of the simple selectors S1, S2 or S3
E:visible(true) an E element which is deeply visible according to Ext.dom.Element.isVisible
CSS Value Selectors:
E{display=none} css value "display" that equals "none"
E{display^=none} css value "display" that starts with "none"
E{display$=none} css value "display" that ends with "none"
E{display*=none} css value "display" that contains the substring "none"
E{display%=2} css value "display" that is evenly divisible by 2
E{display!=none} css value "display" that does not equal "none"
var simple = 'div.bar'; // Only asking for the tag/class name on the element
除了下面的Element/Attribute/Pseudo/CSS value选择器外,上面的基本选择器也值得注意,其中div.bar是由两个选择器合成,一是tag选择器div,另一个是class选择器".bar",只需注意".bar"是class选择器, bar不是一个选择器.
Element Selectors:
* any element
E an element with the tag E
E F All descendent elements of E that have the tag F
E > F or E/F all direct children elements of E that have the tag F
E + F all elements with the tag F that are immediately preceded by an element with the tag E
E ~ F all elements with the tag F that are preceded by a sibling element with the tag E
Attribute Selectors:
The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.
E[foo] has an attribute "foo"
E[foo=bar] has an attribute "foo" that equals "bar"
E[foo^=bar] has an attribute "foo" that starts with "bar"
E[foo$=bar] has an attribute "foo" that ends with "bar"
E[foo*=bar] has an attribute "foo" that contains the substring "bar"
E[foo%=2] has an attribute "foo" that is evenly divisible by 2
E[foo!=bar] attribute "foo" does not equal "bar"
Pseudo Classes:
E:first-child E is the first child of its parent
E:last-child E is the last child of its parent
E:nth-child(_n_) E is the _n_th child of its parent (1 based as per the spec)
E:nth-child(odd) E is an odd child of its parent
E:nth-child(even) E is an even child of its parent
E:only-child E is the only child of its parent
E:checked E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)
E:first the first E in the resultset
E:last the last E in the resultset
E:nth(_n_) the _n_th E in the resultset (1 based)
E:odd shortcut for :nth-child(odd)
E:even shortcut for :nth-child(even)
E:contains(foo) E's innerHTML contains the substring "foo"
E:nodeValue(foo) E contains a textNode with a nodeValue that equals "foo"
E:not(S) an E element that does not match simple selector S
E:has(S) an E element that has a descendent that matches simple selector S
E:next(S) an E element whose next sibling matches simple selector S
E:prev(S) an E element whose previous sibling matches simple selector S
E:any(S1|S2|S2) an E element which matches any of the simple selectors S1, S2 or S3
E:visible(true) an E element which is deeply visible according to Ext.dom.Element.isVisible
CSS Value Selectors:
E{display=none} css value "display" that equals "none"
E{display^=none} css value "display" that starts with "none"
E{display$=none} css value "display" that ends with "none"
E{display*=none} css value "display" that contains the substring "none"
E{display%=2} css value "display" that is evenly divisible by 2
E{display!=none} css value "display" that does not equal "none"
发表评论
-
Fiddler使用
2017-06-22 16:27 653Fiddler不能捕获chrome request 原因是,c ... -
Javascript跨域
2017-06-21 17:05 623在js中,我们直接用XMLHttpRequest请求不同域上 ... -
面向对象的JavaScript,ECMAScript6, ECMAScript2015
2017-02-11 21:11 559全面理解面向对象的 JavaScript http://www ... -
SASS用法指南
2016-03-03 14:18 700SASS用法指南 http://www.ruanyifeng. ... -
Angular JS与ExtJS比较
2016-01-04 13:54 1619ExtJS vs AngularJS http://www.t ... -
ExtJS POST请求客户端服务端案例
2015-11-10 15:29 1255客户端GUI端示例 var positionIDList = ... -
Javascript设计模式
2015-09-29 14:12 821书名:Learning JavaScript Design P ... -
JavaScript单例模式Singleton Pattern
2015-09-29 14:10 1364参考链接:http://www.dofactory.com/j ... -
Check scope of element in Angular JS
2015-06-16 15:36 765step 1) choose an element in de ... -
有意思的HTML5效果
2015-03-18 09:24 1246http://www.html5tricks.com/9-fu ... -
JavaScript内存溢出
2015-02-13 10:42 1097http://javascript.info/tutorial ... -
JavaScript Variable Scope and Closure(闭包)
2015-02-11 09:52 929参考文章: http://javascript.info/tu ... -
JavaScript电子相册
2015-02-05 09:36 1797http://www.webhek.com/misc/3d-a ... -
JavaScript学习笔记
2015-01-11 10:59 815Repeated and Omitted Declaratio ... -
JavaScript小技巧
2014-12-26 10:00 883关系javascript变量的内存 ... -
JavaScript TimeZone issue
2014-10-31 11:48 0Tue Jan 01 2008 23:45:00 GMT+03 ... -
转义字符处理,获取字符的ASCII码值
2014-10-24 13:58 2026Java 获取字符的ASCII码值 int asciiDec ... -
JavaScript技巧,最佳实践(Best Practice)
2014-10-20 10:03 68045个实用的JavaScript技巧、窍门和最佳实践 http ... -
如何跨域获取Cookie
2014-06-23 14:32 3131cookie可以跨子域访问,如果用户信息保存在qq.com的c ... -
JavaScript获取图片(Image)的大小(宽度,高度)
2014-05-13 17:46 1900如果只有图片的URL function getImageD ...
相关推荐
伪元素选择器不是实际的HTML元素,而是用于添加或修改页面内容的虚拟元素。它们允许我们向元素内容的前后插入额外的文本、图像或其他内容。CSS3 中的 `:before` 和 `:after` 伪元素选择器提供了这样的功能。 1. `:...
本文介绍了CSS中多种类型的选择器,包括类与ID选择器、元素选择器、属性选择器、伪类和伪元素等。通过这些选择器,我们可以精确控制页面的布局和样式,实现复杂的设计效果。掌握这些选择器是成为优秀前端开发人员的...
接下来是关系选择符,包括后代选择器、直接子元素选择器、相邻选择器、兄弟选择器和并列选择器。后代选择器(EF)用于选中某个元素(E)内部的所有指定元素(F),不论层级深浅。直接子元素选择器(E>F)则只选中...
通用元素选择器*是选择页面上的全部元素,上面的代码作用是把全部元素的 margin 和 padding 设为 0,最基本的清除默认 CSS 样式。*选择器也可以应用到子选择器中,例如下面的代码: #container * { border: 1px ...
CSS基础-选择器进阶+背景属性+元素显示模式+三大特性 CSS基础选择器进阶: 在CSS中,选择器是用于选择HTML元素并应用样式的核心机制。选择器进阶是指在基础选择器的基础上,进一步学习和应用选择器的高级规则和...
伪元素选择器允许我们在不改变HTML源代码的情况下,向页面添加额外的视觉元素,比如在特定元素前后插入内容。 伪元素选择器主要有两种:`:before` 和 `:after`。这两个选择器都是用于创建元素的“虚拟”子元素,...
在本章中,我们将深入探讨UI元素状态伪类选择器这一关键CSS概念,它是构建响应式和交互式用户界面的核心工具。伪类选择器允许我们根据元素的不同状态来应用特定的样式,使得网页的视觉反馈更加直观和动态。 首先,...
在上述的“CSS伪元素选择器案例”中,主要介绍了两个关键的伪元素选择器:`::before` 和 `::after`。下面将详细解释这两个选择器的用途以及它们在实际应用中的工作原理。 1. `::before` 选择器: `::before` 选择器...
选择器按功能分为基础选择器、层次选择器、属性选择器、表单选择器、可见性选择器、位置选择器、子元素选择器、内容选择器、属性选择器、表单对象属性选择器以及过滤选择器。每类选择器都有其独特的应用场景,熟悉并...
CSS 选择器是用于选取 HTML 或 XML 文档中元素的语法,它们在网页爬虫、页面解析以及动态网页内容的提取中扮演着重要角色。下面将详细介绍 JSoup 支持的各种 CSS 选择器及其用法。 1. **基本选择器**: - `*`: ...
在jQuery中,选择器分为多种类型,包括基础选择器、类别选择器、ID选择器、属性选择器、后代选择器、子元素选择器、相邻兄弟选择器和通用选择器等。 1. **基础选择器**:主要包括`$()`,用于选取一个或多个DOM元素...
4. 直接子元素选择器:使用`>`连接,如`div > p`选择`div`的直接子元素`p`。 四、属性选择器 属性选择器根据元素的属性来选取元素。例如,`input[type="text"]`会选择所有type属性等于"text"的`input`元素。 五、...
- **元素选择器**:通过元素的标签名来选取,直接写标签名。例如`$('p')`选取所有的`<p>`元素。 - **通配符选择器**:用`*`来选取所有元素。例如`$('*')`选取页面上的所有元素。 组合选择器可以同时选取多个元素,...
- `element`:元素选择器,如`$("p")`选取所有段落。 - `.class`:类选择器,如`$(".myClass")`选取具有特定类名的元素。 - `*`:通配符选择器,选取所有元素。 - `selector1, selector2, selectorN`:组合选择...
- **元素选择器**:直接使用元素名来选取页面上所有的该元素。 - 示例:`$("div")` 选取页面上所有的 `<div>` 元素。 - **通配符选择器**:使用 `*` 来选取页面上的所有元素。 - 示例:`$("*")` 选取页面上的所有...
1. 元素选择器:这是最基础的选择器类型,直接使用元素名来选择页面上的所有该元素。例如,`p {color: red;}` 将使页面上所有的段落文字变为红色。 2. 类选择器:通过在HTML元素的class属性中定义类名,然后在CSS中...
层次选择器包括直系子元素选择器、下一个兄弟元素选择器和之后的所有兄弟元素选择器。直系子元素选择器`>`用于选取某个元素的直接子元素,如`$('div>span')`会选中所有`<div>`标签内的`<span>`子元素。下一个兄弟...
2. **子元素选择器(Child Selector)** - 使用`>`符号连接两个选择器,表示前一个选择器的直接子元素。例如,`ul > li`会选取所有`ul`元素下的直接`li`子元素,而非孙子或曾孙元素。 3. **相邻兄弟选择器...
- 多元素选择器(element,element):可以同时选择多个指定类型的元素。例如,“div,p”将同时选择所有的和元素。 3. 后代选择器(elementelement): - 用于选择元素内部的元素。例如,“divp”会选择所有位于...
1. 元素选择器(Type selector):直接通过元素名来选择,如`p`选择所有`<p>`元素。 2. 类选择器(Class selector):通过类名来选择,如`.intro`选择所有class属性为"intro"的元素。 3. ID选择器(ID selector):...