I have a div
that is centered using this css:
#r0 {
overflow: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
transform-origin: center;
}
And this div is being rotated using this:
$('#r0').css('transform', 'rotateZ(' + xxx + 'deg)');
But I need to append other divs to this div
, but setting transform
property on this div
mispositions those divs and causes unwanted transformations on them, which is natural behavior for them. My question is that is there another way to rotate this div
, for example, using top
and left
, or any other method that wouldn't affect appended children?