Translated descriptions (#21535)

This commit is contained in:
Tay Jing Xuan
2018-12-29 07:06:41 +08:00
committed by Jingyi Ding
parent 378e346077
commit 466e82c930

View File

@@ -1,27 +1,30 @@
---
title: CSS3 Nth Child Selector
localeTitle: CSS3 Nth Child Selector
localeTitle: CSS3 `nth-child`选择器
---
## CSS3 Nth Child Selector
## CSS3 第`nth-child`选择器
`nth-child`选择器是一个css伪类它采用一种模式来匹配一个或多个元素相对于它们在兄弟姐妹中的位置。
## 句法
```CSS
anth-childpattern{
/* Css到这里 */
}
```
### Pattern
The patterns accepted by `nth-child` can come in the form of keywords or an equation of the form An+B.
#### Keywords
### 模式
第`nth-child`所接受的模式可以是关键字或An+B的方程
#### 关键字
##### Odd
Odd returns all odd elements of a given type.
`Odd`会返回所属于特定类型的HTML元素当中的奇数元素。
在下面的示例中,所奇数的`a`元素将会被指定而选择器中的CSS会被插入被指定的元素中。
```CSS
anth-childodd{
@@ -31,7 +34,10 @@ localeTitle: CSS3 Nth Child Selector
```
##### Even
Even returns all even elements of a given type.
`Even`会返回所属于特定类型的HTML元素当中的偶数元素。
在下面的示例中,所位于偶数的`a`元素将会被指定而选择器中的CSS会被插入被指定的元素中。
```CSS
anth-childeven{
@@ -40,10 +46,11 @@ localeTitle: CSS3 Nth Child Selector
```
#### An+B
`An+B`会返回所有属于特定类型的HTML元素中符合An+B(n与每个正整数)的元素
在下面的示例中,每隔三个`a`元素的元素将会被指定而选择器中的CSS会被插入被指定的元素中。
Returns all elements matching the equation An+B for every positive integer value of n (in addition to 0).
For example, the following will match every 3rd anchor element:
```CSS
a:nth-child3n{
/* CSS在这里 */