Skip to content

polygon() ​

描述 ​

polygon() CSS 函数是基本形状值,是 CSS Shapes 模块的一部分。

语法 ​

css
polygon() = polygon( [<fill-rule>,]? [<shape-arg> <shape-arg>]# )

值 ​

  • <fill-rule> 指定用于确定多边形内部的填充规则。可以是非零或偶数。默认值非零。
  • <shape-arg> 可以通过以下任一方式指定:
    • <length> -指定要用于半径的<length>值(例如 px、em、vw 等)。
    • <percentage> - 指定使用<percentage>使用值。百分比值使用参考框的宽度和高度。

效果展示 ​