Skip to content

[zh-cn] update css 'position' #28071

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

Merged
merged 8 commits into from
Jul 29, 2025
Merged

[zh-cn] update css 'position' #28071

merged 8 commits into from
Jul 29, 2025

Conversation

jasonren0403
Copy link
Contributor

Description

Motivation

Additional details

Related issues and pull requests

fixes #27824

@jasonren0403 jasonren0403 requested a review from a team as a code owner July 19, 2025 04:05
@jasonren0403 jasonren0403 requested review from irvin and removed request for a team July 19, 2025 04:05
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Jul 19, 2025
Copy link
Contributor

github-actions bot commented Jul 19, 2025

Preview URLs

Flaws (1)

URL: /zh-CN/docs/Web/CSS/position
Title: position
Flaw count: 1

  • broken_links:
    • /en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context is a redirect
External URLs (3)

URL: /zh-CN/docs/Web/CSS/position
Title: position

(comment last updated: 2025-07-28 08:01:41)

jasonren0403 and others added 3 commits July 19, 2025 12:11
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -244,7 +269,7 @@ span {

### 固定定位

固定定位与绝对定位相似,但元素的包含块为 viewport 视口。该定位方式常用于创建在滚动屏幕时仍固定在相同位置的元素。在下面的示例中,"One" 元素定位在离页面顶部 80px,离页面左侧 20px 的位置
固定定位与绝对定位类似,但元素的[包含块](/zh-CN/docs/Web/CSS/CSS_display/Containing_block)是*视口*建立的初始包含块,除非任何祖先的 `transform`、`perspective` 或 `filter` 属性设置为除 `none` 以外的其他属性(请参阅[固定定位包含块](https://drafts.csswg.org/css-position/#fixed-positioning-containing-block)),这样就会使该祖先取代元素[包含块](/zh-CN/docs/Web/CSS/CSS_display/Containing_block)。这可以用来创建一个“浮动”元素,无论滚动与否,它都会保持在同一位置。在下面的示例中,盒子“一”被固定在距离页面顶部 80 像素和左侧 10 像素的位置。即使滚动后,它也会保持在相对于视口的同一位置。此外,当 [`will-change`](/zh-CN/docs/Web/CSS/will-change) 属性设置为 `transform` 时,会建立一个新的包含块

#### HTML

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下面的 HTML 做一下本地化?参考维基百科

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

选了“意义”那一节的比较长的翻译

<div>
<dl>
<dl>
<div>
<dt>A</dt>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看看好不好本地化

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

想了下模拟字典拼音查字法的结构

jasonren0403 and others added 3 commits July 22, 2025 22:59
@jasonren0403 jasonren0403 requested a review from yin1999 July 28, 2025 08:01
@yin1999 yin1999 merged commit ddcd3e3 into main Jul 29, 2025
10 checks passed
@yin1999 yin1999 deleted the css-position-zhcn branch July 29, 2025 00:46
@github-project-automation github-project-automation bot moved this from Review requested to Done in MDN translated-content l10n-zh Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
Development

Successfully merging this pull request may close these issues.

关于position:sticky的描述
2 participants