将 <img> 元素的右中心点固定到定义的路径:
img {
offset-path: path('M 50 80 C 150 -20 250 180 350 80');
offset-anchor: right center;
}
亲自试一试 »
这个offset-anchor
属性指定要沿着由 定义的路径固定的元素上的点offset-path
属性。
定义的点offset-anchor
如果元素随着旋转而旋转,属性也将是旋转中心offset-rotate
属性。
笔记:该属性目前仅适用于 Firefox 浏览器。
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
offset-anchor | Not supported | Not supported | 72.0 | Not supported | Not supported |
offset-anchor: auto|
value|initial|inherit;
Value | Description |
---|---|
auto | Default. The achored point will be in the center of the element, same as property value '50% 50%'. |
left top left center left bottom right top right center right bottom center top center center center bottom |
If you only specify one keyword, the other value will be "center" |
xpos ypos | The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0. Units can be pixels (0px 0px) or any other CSS units. If you only specify one value, the other value will be 50%. You can mix % and positions |
x% y% | The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If you only specify one value, the other value will be 50%. Default value is: 50% 50% |
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 偏移距离属性
CSS 偏移路径属性:CSS 偏移路径属性
CSS 偏移旋转属性:CSS 偏移旋转属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!