CSS Shapes - CSS: Cascading Style Sheets 编辑
CSS Shapes describe geometric shapes for use in CSS. For the Level 1 specification, CSS Shapes can be applied to floating elements. The specification defines a number of different ways to define a shape on a floated element, causing wrapping lines to wrap round the shape rather than following the rectangle of the element's box.
Basic example
The example below shows an image that has been floated left, and the shape-outside
property applied with a value of circle(50%)
. This creates a circle shape, and the content wrapping the float now wraps around that shape. This changes the length of the wrapping text's line boxes.
Reference
Properties
Data types
Guides
- Overview of CSS Shapes
- Shapes from Box Values
- Basic Shapes
- Shapes from Images
- Edit Shape Paths in CSS — Firefox Developer Tools
External Resources
- A list of CSS Shapes resources
- CSS Shapes 101
- Creating non-rectangular layouts with CSS Shapes
- How To Use CSS Shapes In Your Web Design
- How To Get Started With CSS Shapes
- What I Learned In One Weekend With CSS Shapes
- CSS vs. SVG: Shapes and Arbitrarily-Shaped UI Components
Specifications
Specification | Status | Comment |
---|---|---|
CSS Shapes Module Level 1 | Candidate Recommendation | Initial definition |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论