jQuery1.4 中逐个修改一句话中各个字的字体大小 jquery字体animatecallback 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0-rc1.js"></script><script type="text/javascript">var i = 0;var st;$(document).ready(function(){ $("input").click(function(){ st = setInterval(sleep,2000); }) });function sleep(numberMillis) { var span = $("span"); var len = $("span").length; for(;i<len;){ $(span[i]).animate({fontSize:"50px"},1000,function(){ $(this).animate({fontSize:"20px"},10000); }); i++ break; } if(i == len){ clearInterval(st); }}</script></head><body><input type="button" value="Start"><br/><span>H</span> <span>e</span> <span>l</span> <span>l</span> <span>o</span> <span>,</span> <span>W</span> <span>o</span> <span>r</span> <span>l</span> <span>d</span> <span>!</span></body></html>可以实现你要的功能但是效果不是很好 自己在优化下 <html><head><script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0-rc1.js"></script><style>div{line-height:60px;text-align:center}</style><script type="text/javascript">$(document).ready(function(){var span=$("span"),arr=[60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5,5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5,5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60],l=0,k; $("input").click(function(){ setInterval(function(){ $.each(span,function(i,item){ $(item).css("font-size",arr[l+i]+"px"); }); l=l>22?0:l+1; },100); }) });</script></head><body><input type="button" value="Start"><div><span>H</span> <span>e</span> <span>l</span> <span>l</span> <span>o</span> <span>,</span> <span>W</span> <span>o</span> <span>r</span> <span>l</span> <span>d</span> <span>!</span></div></body></html> 关于extjs 中用html中table来布局,但我想在table中的td中加入progressbar组件,不知是否可以?请高人指点一二。 JS页面加载问题,在线等高手 javascript 怎么学 我的Cookie哪去了??!! radio 选中问题,用了attr 和 prop 都无效 寻人!! leeyom 请进 如何让一个新打开的子窗口一直做最前面? “如果图片宽度大于75则重设为75”如何实现?已知的一种方法有问题 用Javascript怎样对剪切板进行操作 用js怎么取返回值里的参数 获取网页数据 Highcharts使用什么标签属性可以得到一组Y值得和然后显示出来
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0-rc1.js"></script>
<script type="text/javascript">
var i = 0;
var st;
$(document).ready(function(){
$("input").click(function(){
st = setInterval(sleep,2000);
})
});
function sleep(numberMillis) {
var span = $("span");
var len = $("span").length; for(;i<len;){
$(span[i]).animate({fontSize:"50px"},1000,function(){
$(this).animate({fontSize:"20px"},10000);
});
i++
break;
}
if(i == len){
clearInterval(st);
}
}
</script>
</head>
<body>
<input type="button" value="Start"><br/>
<span>H</span> <span>e</span> <span>l</span> <span>l</span> <span>o</span> <span>,</span> <span>W</span> <span>o</span> <span>r</span> <span>l</span> <span>d</span> <span>!</span>
</body></html>
可以实现你要的功能但是效果不是很好 自己在优化下
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0-rc1.js"></script>
<style>
div{line-height:60px;text-align:center}
</style>
<script type="text/javascript">
$(document).ready(function(){
var span=$("span"),arr=[60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5,5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5,5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60],l=0,k;
$("input").click(function(){
setInterval(function(){
$.each(span,function(i,item){
$(item).css("font-size",arr[l+i]+"px");
});
l=l>22?0:l+1;
},100);
})
});
</script>
</head>
<body>
<input type="button" value="Start">
<div>
<span>H</span> <span>e</span> <span>l</span> <span>l</span> <span>o</span> <span>,</span> <span>W</span> <span>o</span> <span>r</span> <span>l</span> <span>d</span> <span>!</span>
</div>
</body></html>