Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$("#div").css("transform", "rotateY("+ '+='+90 +"deg)");
我想增加rotateY,但我的语法不好,是否可以修复它?
rotateY
将当前旋转保存在变量中是最简单的,只需增加它的值而无需检索当前旋转:
rotation += 90; $("#div").css("transform", "rotateY("+rotation+"deg)");
否则,您将需要解析转换的 css 值,因为它是字符串。