-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[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
Conversation
Preview URLs Flaws (1)URL:
External URLs (3)URL:
(comment last updated: 2025-07-28 08:01:41) |
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 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面的 HTML 做一下本地化?参考维基百科
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看看好不好本地化
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
想了下模拟字典拼音查字法的结构
Co-authored-by: A1lo <yin199909@aliyun.com>
Description
Motivation
Additional details
Related issues and pull requests
fixes #27824