How to increase and decrease text size in web page? [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
开发者_如何学运维 Improve this questionHow do I increase and decrease text size on a web page using PHP, CSS, or JQuery?
You can increase text size on the whole page (for all elements that inherit text size from the 'body') with:
function setFontSize(size) {
$('body').css('font-size', '' + size + 'px');
}
Demo here.
Check the font-size
CSS property
Reference: http://www.w3.org/TR/CSS2/fonts.html#font-size-props
Set text-size on the text container (a p, a div, a span, ...).
<p style='font-size:120%'>
精彩评论