Firefox Quantum似乎存在转换包含透视图的转换的问题。请在FireFox中查看此示例: https://codepen.io/morteza-fsh/pen/JLdGOw
非常感谢任何建议。
const btn = document.getElementById('btn');
const img = document.getElementById('img');
const transform = 'perspective(2000px) translateX(300px) translateZ(-1000px) rotate(360deg)';
img.style.transition = 'all 1s';
img.style.transform = transform;
btn.onclick = () => {
if ( img.style.transform.length ) {
img.style.transform = '';
} else {
img.style.transform = transform;
}
};
<button id="btn">Toggle Animation</button>
<img id="img" src="https://blog.mozilla.org/firefox/files/2017/12/firefox-logo-1000x1032.png" width="150" alt="">