Skip to content
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

adds Chinese expiation and more stylings #26642

Merged
merged 1 commit into from
Jun 2, 2019
Merged
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
38 changes: 30 additions & 8 deletions guide/chinese/css/navigation-bars/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,57 @@ localeTitle: 导航栏
```

```css
/* Define the main Navigation block */
body {
margin:0;
}

/* 將你的主导航栏設為 BLOCK */
.myNav {
display: block;
width: 100vw;
height: 50px;
line-height: 50px;
background-color: #333;
margin: 0;
padding: 0;
}
/* Remove bullets, margin and padding */
/*
去除不需要的编目設定: list-style
去除不需要的位置: MARGIN & PADDING
*/
.myNav ul {
list-style: none;
padding: 0;
margin: 0;
}
/* 將编目下的项目排成一行 */
.myNav li {
float: left;
/* Or you can use display: inline; */
display: inline
}
/* Define the block styling for the links */

/* 將你的子项目 li 設為 inline-block */
.myNav li a {
display: inline-block;
text-align: center;
padding: 14px 16px;
color: #fff;
/* 去除默认的子项目风格: list-style */
text-decoration: none;
}
/* This is optional, however if you want to display the active link differently apply a background to it */

/* 當你滑到子项目時的顯示 */
.myNav li a:hover {
background-color: rgba(165, 165, 165, .5)
}

/*
如果你想顯示當時的子项目
你可以將這個 active class 放在你的HTML
*/
.myNav li a.active {
background-color: #3786E1;
}
```

#### 更多信息:

更多导航示例: [W3Schools](https://www.w3schools.com/css/css_navbar.asp)
更多导航示例: [W3Schools](https://www.w3schools.com/css/css_navbar.asp)