You can use the += operator to add rotateX(20deg) to an existing transformation.
el.style.webkitTransform += "rotateX(20deg)";
Note. I used a different transformation in the snippet below for a visual effect, but the method is the same.
window.onload = function() { var el = document.getElementsByTagName("div")[0]; el.style.webkitTransform += "rotateZ(20deg)"; console.log(el.style.webkitTransform); document.getElementById("changeDeg").onclick = changeDeg;
div { background: red; margin-bottom: 20px; }
<div class="display-object child0" style="-webkit-transform: translateX(43.5px) translateY(6px); width: 50px; height: 50px;"></div> <button id="changeDeg">Change Rotation</button>
source share