JQUERY改变字体大小
2010-05-24 17:20
155 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gbk" /> <mce:script type="text/javascript" src="lib/jquery/jquery-1.3.2.js" mce_src="lib/jquery/jquery-1.3.2.js"></mce:script> <title>JQuery的应用第一章</title> <mce:style type="text/css"><!-- .button{ display:inline; width:200px; height:20px; } .show{ width:400px; background-color:red; } .normal{ font-size:12px; } .large{ font-size:20px; } --></mce:style><style type="text/css" mce_bogus="1"> .button{ display:inline; width:200px; height:20px; } .show{ width:400px; background-color:red; } .normal{ font-size:12px; } .large{ font-size:20px; } </style> <mce:script type="text/javascript"><!-- $('document').ready(function(){ $('#normal').click(function(){ $('#textshow').removeClass('large'); $('#textshow').addClass('normal'); }); $('#large').click(function(){ $('#textshow').removeClass('normal'); $('#textshow').addClass('large'); }) }) // --></mce:script> </head> <body> <span class="button" id="normal">[<a href="javascript:void(0)" mce_href="javascript:void(0)">小</a>]</span><span class="button" id="large">[<a href="javascript:void(0)" mce_href="javascript:void(0)">大</a>]</span> <div id="textshow" class="show"> 这是JQuery的应用,改变文字的大小,注意下,文字大小是否改变了.<br/> 这是很多小说网中实用的工具.应用JQuery的ready()函数绑定事件.<br/> $('#textshow')返回id为textshow的Dom实例.<br/> addClass()添加样式.removeClass()移出样式. </div> </body> </html>
相关文章推荐
- jquery 改变字体的大小
- JQuery 改变页面字体大小的实现代码(实时改变网页字体大小)
- jquery更换文章内容与改变字体大小代码
- jquery更换文章内容与改变字体大小代码
- jquery实现实时改变网页字体大小、字体背景色和颜色的方法
- jquery 文章内容字体大小更换与改变代码
- jquery实现实时改变网页字体大小、字体背景色和颜色的方法
- jquery 自动改变字体大小
- jquery实现改变显示的文字的背景色和字体大小
- JQuery 改变页面字体大小
- JQuery 改变页面字体大小的实现代码(实时改变网页字体大小)
- jQuery 改变页面字体的大小
- 改变 placeholder 颜色、字体大小
- 【FAQ】Arduino 编辑器改变字体大小后,代码对齐错乱
- android代码中设置EditText的hint字体大小而不改变EditText的文字大小
- 怎样改变Myeclipse中控制台的字体大小
- jquery 鼠标拖动改变div大小
- NSIS改变字体大小
- 怎样改变CHM电子书里的字体大小?
- TextView改变部分字体的大小和颜色及首行缩进