Html 动画中的响应体
如何在导出的文件中嵌入BodyMov以响应,同时保持徽标和字体的正确纵横比,并适合我网站的寄宿者?有什么想法吗Html 动画中的响应体,html,json,animation,svg,bodymovin,Html,Json,Animation,Svg,Bodymovin,如何在导出的文件中嵌入BodyMov以响应,同时保持徽标和字体的正确纵横比,并适合我网站的寄宿者?有什么想法吗 提前感谢您您可以使用渲染器的PreserveSpectRatio设置。 加载动画时将其作为参数传递: bodymovin.loadAnimation({ container: element, renderer: 'svg', loop: true, autoplay: true, path: 'path/to/the/json', rendererSettin
提前感谢您您可以使用渲染器的PreserveSpectRatio设置。 加载动画时将其作为参数传递:
bodymovin.loadAnimation({
container: element,
renderer: 'svg',
loop: true,
autoplay: true,
path: 'path/to/the/json',
rendererSettings: {
preserveAspectRatio: 'xMidYMid meet'
}
});
我想这里需要的是PreserveSpectRatio:“xMidYMid slice”您可以使用渲染器的PreserveSpectRatio设置。 加载动画时将其作为参数传递:
bodymovin.loadAnimation({
container: element,
renderer: 'svg',
loop: true,
autoplay: true,
path: 'path/to/the/json',
rendererSettings: {
preserveAspectRatio: 'xMidYMid meet'
}
});
我想你想要的是PreserveSpectratio:“xMidYMid slice”