Is there any way using JavaScript or jQuery to increase all the font sizes on the page by a certain percentage after the page loads?
To make the texts larger, press “Ctrl + Shift + >”. To make the texts smaller, press “Ctrl + Shift + <”.
click(function() { $("body"). css("fontSize", "120%"); }); Done.
Zoom property will affect all other properties like dimensions. And also it will not be supported in all browsers. best way is to reduce using some jQuery code like follows
$(document).ready(function(){
$('*').each(function(){
var k = parseInt($(this).css('font-size'));
var redSize = ((k*90)/100) ; //here, you can give the percentage( now it is reduced to 90%)
$(this).css('font-size',redSize);
});
});
Would zooming the entire page have the desired affect? (A little different that just increasing the font sizes).
The CSS zoom
property is supported by IE 5.5+, Opera, and Safari 4, and Chrome. For Firefox, you can use -moz-transform: scale(2)
. So to zoom the entire page:
<body style="zoom:2; -moz-transform:scale(2);"> ... </body>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With