Let's say I have a div
that had translateX
and translateY
values added dynamically.
<div class="object child0"
style="-webkit-transform: translateX(873.5px) translateY(256px);
width: 50px; height: 50px;">
I want to add rotateY(20deg)
to the current transforms, but applying it via
element.style.webkitTransform = "rotateX(20deg)"
loses the other values.
Is there a way to add the rotateY
without losing the translateX
and translateY
transforms?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…