Skip to content

Instantly share code, notes, and snippets.

@jikeytang
Created June 16, 2014 01:31
Show Gist options
  • Save jikeytang/3657ed86b66be8e9a928 to your computer and use it in GitHub Desktop.
Save jikeytang/3657ed86b66be8e9a928 to your computer and use it in GitHub Desktop.
[ CSS ] - 20140616-题目1
解释以下选择器的区别:
1. body 与 .body
2. .main .sub 与 (.main, .sub)
3. .main > .sub 与 .main .sub
4. .main + .sub 与 .main .sub
5. .main + .sub 与 .main > .sub
6. [abc^="def"] 与 [abc$="def"] 与 [abc*="def"] 与 [abc^="def"] 与 [abc|="def"] 与 [abc~="def"]
7. p:first-child 与 ::first-line
8. * 与 (.main *)
9. :nth-child 与 :nth-last-child 与 :nth-of-type 与 :last-child 与 :first-of-type 与 :empty
PS:
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。
```html
// you code
```
2. 也可以粘贴jsfiddle地址,比如:
http://jsfiddle.net/jikeytang/Rmt8M/
评论支持markdown语法。
[http://jsfiddle.net/jikeytang/Rmt8M/](http://jsfiddle.net/jikeytang/Rmt8M/)
@DestroyGod
Copy link

为何哥的一楼就是被吐槽 别人的一楼都是表扬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment