+ 1

CSS(), height(), width() etc.

So can I other units of measurement than just pixels like ems, rems, etc....? example: $("#demo") height(68xx); If so, what is the syntax exactly? I haven't been able to get anything except pixels to work... thanks

26th Jan 2017, 9:39 PM
Texx Smith
Texx Smith - avatar
2 ответов
+ 1
yes, you can use other units too...! syntax -> $('selector').css('property','value'); ex -> $('#demo').css('height', '5em');
26th Jan 2017, 9:46 PM
codeDEcode
codeDEcode - avatar
0
As codeDecode said, any unit of measurement accepted by CSS and your browser is accepted by jQuery.
27th Jan 2017, 5:06 AM
Louis Milotte
Louis Milotte - avatar