我如何嵌入bodymovin导出的文件以响应,同时保持正确的徽标和字体的纵横比,并适合我网站的边界?有什么想法吗?
提前谢谢你
发布于 2017-02-04 22:28:47
可以使用渲染器的preserveAspectRatio设置。加载动画时,将其作为参数传递:
bodymovin.loadAnimation({
container: element,
renderer: 'svg',
loop: true,
autoplay: true,
path: 'path/to/the/json',
rendererSettings: {
preserveAspectRatio: 'xMidYMid meet'
}
});我猜你在这里需要的是切片:'xMidYMid preserveAspectRatio‘
https://stackoverflow.com/questions/42029456
复制相似问题