-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
zh-cn: update the translation of "CSS Shape" module #22809
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,103 @@ | ||
--- | ||
title: CSS Shapes | ||
title: CSS 形状 | ||
slug: Web/CSS/CSS_shapes | ||
l10n: | ||
sourceCommit: 4ecbac9e89961a132c1e7f5493ec94f60dcb1ee4 | ||
--- | ||
|
||
{{CSSRef}} | ||
|
||
**CSS Shapes** 是一个 CSS 模块,用于定义在 CSS 值中使用的几何形状。 | ||
**CSS 形状**(CSS shape)模块用于描述几何形状。它还定义了 CSS 属性,以使用这些形状来控制元素浮动区域;区域可被用于排除或指定元素的内容区域。 | ||
|
||
> **备注:** ### CSS3 Shapes & CSS3 Regions<https://www.w3.org/TR/css-shapes-1/> > <https://www.w3.org/TR/css-regions-1/> | ||
规范定义了几种创建形状的方法。内容可以包裹形状或在形状内而不是遵循元素盒子的默认矩形形状。 | ||
|
||
## Reference | ||
形状模块定义了可以用作 CSS 值的几何形状。该模块提供了用于创建椭圆、多边形和任意几何形状的函数。其他 CSS 模块可以使用该规范定义的形状,包括 [CSS 运动路径](/zh-CN/docs/Web/CSS/CSS_motion_path)和 [CSS 遮盖](/zh-CN/docs/Web/CSS/CSS_masking)。 | ||
|
||
### Properties | ||
## CSS 形状实例 | ||
|
||
以下示例显示了一个向左浮动的图像,并应用了值为 `circle(50%)` 的 `shape-outside` 属性。这将创建一个圆形,使得包裹浮动的内容会包裹着这个形状。这将改变包裹文本的行框的长度。 | ||
|
||
{{EmbedGHLiveSample("css-examples/shapes/overview/circle.html", '100%', 720)}} | ||
|
||
## 参考 | ||
|
||
### 属性 | ||
|
||
- {{cssxref("shape-image-threshold")}} | ||
- {{cssxref("shape-margin")}} | ||
- {{cssxref("shape-outside")}} | ||
|
||
### Data types | ||
> [!NOTE] | ||
> CSS 形状模块引入了尚未实现的 `shape-inside` 和 `shape-padding` 属性。 | ||
|
||
### 数据类型 | ||
|
||
- {{cssxref("<basic-shape>")}} | ||
|
||
## Guides | ||
### 函数 | ||
|
||
- {{cssxref("basic-shape/circle","circle()")}} | ||
- {{cssxref("basic-shape/ellipse","ellipse()")}} | ||
- {{cssxref("basic-shape/inset","inset()")}} | ||
- {{cssxref("basic-shape/path","path()")}} | ||
- {{cssxref("basic-shape/polygon","polygon()")}} | ||
- {{cssxref("basic-shape/rect","rect()")}} | ||
- {{cssxref("basic-shape/shape","shape()")}} | ||
- {{cssxref("basic-shape/xywh","xywh()")}} | ||
|
||
### 术语 | ||
|
||
- [参考框](/zh-CN/docs/Web/CSS/CSS_shapes/Basic_shapes#参考框) | ||
|
||
## 指南 | ||
|
||
- [形状概览](/zh-CN/docs/Web/CSS/CSS_shapes/Overview_of_shapes) | ||
- : 定义使用 `shape-margin` 和 `clip-path` 属性的基本形状,并使用开发者工具调试基本形状。 | ||
- [使用 box 值指定形状](/zh-CN/docs/Web/CSS/CSS_shapes/From_box_values) | ||
- : 使用 `border-radius` 圆角和 CSS 盒子模型的值创建形状。 | ||
- [使用 `shape-outside` 的基本形状](/zh-CN/docs/Web/CSS/CSS_shapes/Basic_shapes) | ||
- : 使用 CSS 形状、参考框和 `shape-outside` 属性创建矩形、圆形、椭圆形和多边形。 | ||
- [来自图像的形状](/zh-CN/docs/Web/CSS/CSS_shapes/Shapes_from_images) | ||
- : 根据半透明图像文件和 CSS 渐变创建形状。 | ||
|
||
_None._ | ||
## 相关概念 | ||
|
||
## Specifications | ||
[CSS 运动路径](/zh-CN/docs/Web/CSS/CSS_motion_path)模块 | ||
|
||
- {{cssxref("offset")}} | ||
- {{cssxref("offset-anchor")}} | ||
- {{cssxref("offset-distance")}} | ||
- {{cssxref("offset-path")}} | ||
- {{cssxref("offset-position")}} | ||
- {{cssxref("offset-rotate")}} | ||
- {{cssxref("ray")}} 函数 | ||
|
||
[CSS 遮盖](/zh-CN/docs/Web/CSS/CSS_masking)模块 | ||
|
||
- {{cssxref("clip")}} | ||
- {{cssxref("clip-path")}} | ||
- {{SVGAttr("clip-rule")}} | ||
- {{cssxref("mask")}} | ||
- {{cssxref("mask-origin")}} | ||
- {{cssxref("mask-position")}} | ||
|
||
[CSS 背景和边框](/zh-CN/docs/Web/CSS/CSS_backgrounds_and_borders)模块 | ||
|
||
- {{cssxref("border-radius")}} 简写 | ||
|
||
[CSS 盒子模型](/zh-CN/docs/Web/CSS/CSS_box_model)模块 | ||
|
||
- {{cssxref("box-edge")}} 数据类型 | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 参见 | ||
|
||
- [CSS 形状资源](https://codepen.io/KristopherVanSant/post/css-shapes-resources) | ||
- [CSS 形状入门](https://alistapart.com/article/css-shapes-101/),来自 alistapart.com(2014) | ||
- [使用 CSS 形状创建非矩形布局](https://www.sarasoueidan.com/blog/css-shapes/),来自 sarasoueidan.com(2013) | ||
- [如何在 Web 设计中使用 CSS 形状](https://webdesign.tutsplus.com/how-to-use-css-shapes-in-your-web-design--cms-27498t),来自 tutsplus.com(2016) | ||
- [开始使用 CSS 形状](https://www.webdesignerdepot.com/2015/03/how-to-get-started-with-css-shapes/),来自 webdesignerdepot.com(2015) | ||
- [使用形状路径编辑器编辑 CSS 形状](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/edit_css_shapes/index.html),来自 mozilla.org(2018)([视频](https://www.youtube.com/watch?v=u9bDe3Bw0sA)) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
see
101
=> https://zh.wikipedia.org/wiki/101_(%E4%BF%9A%E8%AF%AD)