CSS

形状余量 | shape-margin

shape-margin

shape-margin CSS属性为shape-outside添加外边距。

/* <length> values */ shape-margin: 10px; shape-margin: 20mm; /* <percentage> values */ shape-margin: 60%; /* Global values */ shape-margin: inherit; shape-margin: initial; shape-margin: unset;

Initial value0
Applies tofloats
Inheritedno
Percentagesrefer to the width of the containing block
Mediavisual
Computed valueas specified, but with relative lengths converted into absolute lengths
Animation typea length, percentage or calc(
Canonical orderthe unique non-ambiguous order defined by the formal grammar

语法

可用值

<length-percentage>将形状的边距设置为一个<length>值,或者设置为元素包含块的宽度的一个<percentage>值。

形式语法

<length-percentage>where <length-percentage> = <length> | <percentage>

规范

SpecificationStatusComment
CSS Shapes Module Level 1The definition of 'shape-margin' in that specification.Candidate RecommendationInitial definition

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support(Yes)No supportNo supportNo support7.0 -webkit

FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support(Yes)No supportNo supportNo support?