手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >基于jquery实现的文字淡入淡出效果
基于jquery实现的文字淡入淡出效果
摘要:复制代码代码如下:无标题文档$(document).ready(function(){$("#btn1").toggle(function(...

复制代码 代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>

<script type="text/javascript" language="javascript" src="../../jquery-1.7.1.min.js">

</script>

<script language="javascript">

$(document).ready(function(){

$("#btn1").toggle(function(){

$("p").fadeOut("slow");

},function(){

$("p").fadeIn("slow");

});

$("#btn2").toggle(function(){

$("p").fadeTo("slow",0.66);

},function(){

$("p").fadeTo("slow",0.66);

});

});

</script>

</head>

<body>

<p>this is pi<br>

this is pi<br>

this is pi<br>

this is pi<br>

this is pi<br>

this is pi<br>

</p>

<input type="button" value="淡入/淡出" id="btn1">

</body>

<input type="button" value="淡入/淡出 效果 透明度0.66" id="btn2">

</html>

【基于jquery实现的文字淡入淡出效果】相关文章:

jQuery实现dialog设置focus焦点的方法

基于jQuery插件实现环形图标菜单旋转切换特效

jQuery实现鼠标经过图片变亮其他变暗效果

Jquery注册事件实现方法

jquery实现用户打分评分特效

js实现顶部可折叠的菜单工具栏效果实例

JS+CSS实现的拖动分页效果实例

jQuery实现延迟跳转的方法

基于jquery实现下拉框美化特效

jQuery实现文本展开收缩特效

精品推荐
分类导航