--- title: shape-rendering slug: Web/SVG/Attribute/shape-rendering tags: - SVG - SVG线条渲染 - 需要完善 translation_of: Web/SVG/Attribute/shape-rendering ---
指定SVG元素{{SVGElement("path")}}的渲染模式。
类型 | 外观属性 |
---|---|
值 | auto | optimizeSpeed | crispEdges | geometricPrecision | inherit |
可运动 | Yes |
标准文档 | SVG 1.1 (2nd Edition) |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" shape-rendering="optimizeSpeed"><!-- 这个示例在Firefox下看区别更明显 -->
shape-rendering: geometricPrecision: |
shape-rendering: optimizeSpeed |
同样,你也可以在css样式中使用shape-rendering:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" style="shape-rendering:optimizeSpeed;">
下面的元素可以使用这个属性