jQuery中的隐藏和显示
来源:互联网 发布:秦舞阳13岁杀人知乎 编辑:程序博客网 时间:2024/06/07 23:29
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/jquery-1.11.0.min.js.js" charset="UTF-8"></script>
<style>
#img{
width: 50px;
height: 50px;
}
</style>
</head>
<body>
<img id="img" src="img/android-alarm.png" />
<input type="button" id="btn1" value="隐藏" />
<input type="button" id="btn2" value="显示" />
<input type="button" id="btn3" value="滑动显示" />
<input type="button" id="btn4" value="滑动隐藏" />
<input type="button" id="btn5" value="淡显示" />
<input type="button" id="btn6" value="淡隐藏" />
<input type="button" id="btn7" value="自定义" />
</body>
<script type="text/javascript">
$("#btn1").click(function(){
$("#img").hide(2000);
})
$("#btn2").click(function(){
$("#img").show(2000);
})
$("#btn3").click(function(){
$("#img").slideDown(2000);
})
$("#btn4").click(function(){
$("#img").slideUp(3000);
})
$("#btn5").click(function(){
$("#img").fadeIn(5000);
})
$("#btn6").click(function(){
$("#img").fadeOut(5000);
})
$("#btn7").click(function(){
$("#img").animate({
width: "10%",
height: "10%",
},2000);
});
</script>
</html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/jquery-1.11.0.min.js.js" charset="UTF-8"></script>
<style>
#img{
width: 50px;
height: 50px;
}
</style>
</head>
<body>
<img id="img" src="img/android-alarm.png" />
<input type="button" id="btn1" value="隐藏" />
<input type="button" id="btn2" value="显示" />
<input type="button" id="btn3" value="滑动显示" />
<input type="button" id="btn4" value="滑动隐藏" />
<input type="button" id="btn5" value="淡显示" />
<input type="button" id="btn6" value="淡隐藏" />
<input type="button" id="btn7" value="自定义" />
</body>
<script type="text/javascript">
$("#btn1").click(function(){
$("#img").hide(2000);
})
$("#btn2").click(function(){
$("#img").show(2000);
})
$("#btn3").click(function(){
$("#img").slideDown(2000);
})
$("#btn4").click(function(){
$("#img").slideUp(3000);
})
$("#btn5").click(function(){
$("#img").fadeIn(5000);
})
$("#btn6").click(function(){
$("#img").fadeOut(5000);
})
$("#btn7").click(function(){
$("#img").animate({
width: "10%",
height: "10%",
},2000);
});
</script>
</html>
阅读全文
0 0
- jQuery中的隐藏和显示
- JQuery中的滑动显示和隐藏
- jQuery 隐藏和显示
- jquery显示和隐藏
- jQuery 隐藏和显示
- jquery隐藏和显示
- Jquery显示和隐藏
- Jquery显示和隐藏
- jquery-隐藏和显示
- jQuery怎么动态显示和隐藏datagrid中的某一列
- jquery实现显示和隐藏
- jquery 隐藏和显示标签
- Jquery 显示和隐藏特效
- jQuery 效果 - 隐藏和显示
- jquery 隐藏和显示效果
- jQuery 效果 - 隐藏和显示
- Jquery 点击隐藏和显示
- jQuery 效果- 隐藏和显示
- 问马云:6个最犀利的问题
- pyinstaller+scipy
- init: function() {表示什么意思
- HTML基础
- iOS ShareSDK微博分享失败无反应,没有输出失败的原因之一..
- jQuery中的隐藏和显示
- 使用EL表达式正确情况下报错:javax.servlet.jsp cannot be resolved to a type
- Linux管道(pipe)的那些事
- openssl 的编译 (windows)
- Variant Call Format (VCF) 笔记
- 《SLA By Short Brain》六原则
- 关于ssdb编译的小问题-cannot stat `ssdb-server': No such file or directory
- ES6爬坑之路之const关键字
- 利用随机数函数掷骰子