Skip to content

to ensure consistency #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ Instead of putting on the border...
}
```

...and then taking it off the last element...
...and then taking it off the first element...

```css
/* remove border */
.nav li:last-child {
.nav li:first-child {
border-right: none;
}
```

...use the `:not()` pseudo-class to only apply to the elements you want:

```css
.nav li:not(:last-child) {
.nav li:not(:first-child) {
border-right: 1px solid #666;
}
```
Expand Down
6 changes: 3 additions & 3 deletions translations/zh-CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ button {
}
```

为最后一个元素去除边框
为第一个元素去除边框

```css
/* 去掉边框 */
.nav li:last-child {
.nav li:first-child {
border-right: none;
}
```

不过不要这么做,使用 `:not()` 伪类来达到同样的效果:

```css
.nav li:not(:last-child) {
.nav li:not(:first-child) {
border-right: 1px solid #666;
}
```
Expand Down