<img> 元素放置在其定义的路径上,距路径起点的距离为 33%。
img {
offset-path: path('M 50 80 C 150 -20 250 180 350 80');
offset-distance: 33%;
}
亲自试一试 »
这个offset-distance
属性设置元素距由 定义的路径起点的距离offset-path
属性。
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
offset-distance | 55.0 | 79.0 | 72.0 | Not supported | 42.0 |
offset-distance: auto|
value|initial|inherit;
Value | Description |
---|---|
0 | The element is placed at the start of its path. This is default. |
length | Specifies the elements distance from the start of its path in px, pt, cm, etc. Negative values are not allowed. Read about length units |
% | Specifies the distance in percent relative to the lenth of the path. |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
HTML SVG 教程:SVG路径
CSS教程:CSS 动画
CSS偏移属性:CSS 偏移属性
CSS 偏移锚点属性:CSS Offset-anchor 属性
CSS 偏移路径属性:CSS 偏移路径属性
CSS 偏移旋转属性:CSS 偏移旋转属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!