欢迎来到天天文库
浏览记录
ID:9268840
大小:29.00 KB
页数:6页
时间:2018-04-25
《用javascript改变网页字体大小的技巧》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、用javascript改变网页字体大小的技巧我们在很多网页上都见过,可以改变该网页字体大小。下面介绍几种实现的方法:第一种方法:分为大、中、小控制正文字体大小,一般需要指定id
2、){varobj;obj=document.getElementById("content");obj.style.fontSize=size;//obj.style.color="#ff0000";}
3、id="content">欢迎来到php自学网http://www.phpzixue.cn
6、+减小字体欢迎来到php自学网http://www.phpzixue.cn第三种方法:只有增加减小两种方法,不过很实用,本站也是用的这种方7、tp-equiv="Content-Type"content="text/html;charset=gb2312"/>//更改字体大小varstatus0="";varcurfontsize=10;varcurlineheight=18;functionturnsmall(){if(curfontsize>10){document.getElementById("art8、_content").style.fontSize=(--curfontsize)+"pt";document.getElementById("art_content").style.lineHeight=(--curlineheight)+"pt";}}functionturnbig(){if(curfontsize<28){document.getElementById("art_content").style.fontSize=(++curfontsize)+"pt";document
7、tp-equiv="Content-Type"content="text/html;charset=gb2312"/>//更改字体大小varstatus0="";varcurfontsize=10;varcurlineheight=18;functionturnsmall(){if(curfontsize>10){document.getElementById("art
8、_content").style.fontSize=(--curfontsize)+"pt";document.getElementById("art_content").style.lineHeight=(--curlineheight)+"pt";}}functionturnbig(){if(curfontsize<28){document.getElementById("art_content").style.fontSize=(++curfontsize)+"pt";document
此文档下载收益归作者所有