- 2

After adding value to Height="50%", the tree image become bigger. Not 50% smaller.

Any idea?

18th Jan 2017, 1:20 PM
Adith Widya Pradipta
Adith Widya Pradipta - avatar
3 ответов
+ 2
Try this, CSS : img {transform: scale(0.5)}
18th Jan 2017, 1:58 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
50% is in relation to the element around your image, not the image itself.
18th Jan 2017, 1:29 PM
Andreas K
Andreas K - avatar
0
While measuring with %, use width attribute only and it will keep ratio of image and height makes no difference with %.
27th Jan 2017, 5:27 PM
Masood
Masood - avatar