Safari中不支持css运动路径.我曾try 使用css支持规则来定位偏移量路径,但它不起作用.
if (CSS.supports("offset-path", "M0.5 1H1549.5")) {
console.log("supported yay");
// Motion path is not supported, apply fallback styles or alternative actions
// element.style.transform = "translateX(100px)";
} else {
console.log("not supported");
}
我try 了这个逻辑,但它在Chrome浏览器中不起作用.我做错了什么?