Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3 how to calculate height and width after scale [duplicate]

Is there any jQuery solution that to find exact display height of the -webkit-transform: scale(0.7851);

the scale value may vary that is why looking for proper solution

Tested these options unfortunately didn't find solution yet :(

height()
innerHeight()
outerHeight()
outerHeight(true)

I think this issue only can fix one the basis of mathematics ;)

like image 334
Mo. Avatar asked May 09 '13 17:05

Mo.


People also ask

How do you find the height and width in CSS?

The CSS height and width property are used to specify the height and width of an element respectively. We can also set the maximum and minimum values for these properties using the max-height, max-width, min-height, and min-width properties.

How do you resize or scale objects in CSS3?

The scale() CSS function defines a transformation that resizes an element on the 2D plane. Because the amount of scaling is defined by a vector, it can resize the horizontal and vertical dimensions at different scales. Its result is a <transform-function> data type.

Which CSS3 property can be used to resize the width and height of an element by 5 times and 6 times?

The scale() method increases or decreases the size of an element.


1 Answers

Use getBoundingClientRect().

element.getBoundingClientRect().height

See DEMO.

like image 145
Antony Avatar answered Oct 16 '22 19:10

Antony