2
<div class="element-wrapper">
<div class="target-element" style="transform: rotate(0.982927rad); width: 148px; height: 46px;">Heading</div>
</div>

Before Rotate before rotate

After Rotate after rotate

As seen in the screenshot. I want to change height and width of "element-wrapper" as per transform angle ( like 2nd screenshot after rotate ).

You can check fiddle here!

maheshwaghmare
  • 2,082
  • 19
  • 23
  • In css you can not do it (complex answer here: http://stackoverflow.com/a/16302202/4771277), you can just use javascript, more here: http://stackoverflow.com/questions/10392658/calculate-the-bounding-boxs-x-y-height-and-width-of-a-rotated-element-via-jav – Autista_z May 12 '17 at 07:58

0 Answers0