Makrushnik
Makrushnik

Reputation: 1

After scaling an image with the help of CSS3's `scale` property, how to get the actual width/height of the image?

After scaling an image with the help of CSS3's scale property, how to get the actual width/height of the image?

Upvotes: 0

Views: 345

Answers (1)

Jakub Hampl
Jakub Hampl

Reputation: 40543

scale = 1.4;
$('#image').css('transform', 'scale('+scale+')');
var actual_height = $('#image').height() * scale;

Upvotes: 1

Related Questions