css动画

 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
 <title></title>
 <script src="js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
 <!--
 1.4.1 显示与隐藏
 normal slow fast
 1.4.2 淡入淡出
 
 1.4.3 自定义动画------《
 animate
 $("#block").animate({
 width: "90%",
 height: "100%",
 fontSize: "10em",
 borderWidth: 10
 }, 1000 );
 
 1.4.4 动画停止与延时
 stop([cle],[jum])1.7*
 delay(duration,[queueName])
 -->
 </head>
 <body>
  
 <img src="img/a1.jpg" id="img0" style="position: relative;"/>
 <input type="button" id="show" value="显示" />
 <input type="button" id="hide" value="隐藏" />
 <hr />
 <input type="button" id="dr" value="淡入" />
 <input type="button" id="dc" value="淡出" /><BR>
 <input type="button" id="zdy" value="自定义动画" />
 <script type="text/javascript">
 $("#show").click(function(){
  
 $("#img0").show(3000);
  
 });
  
 $("#hide").click(function(){
  
 $("#img0").hide(3000);
  
 });
  
 //-------------------
 $("#dr").click(function(){
  
 $("#img0").fadeIn(2000);
  
 });
  
 $("#dc").click(function(){
  
 $("#img0").fadeOut(2000);
  
 });
 //-----------------------
 $("#zdy").click(function(){
  
 $("#img0").animate({
 left: "90%",
 }, 1000 );
  
 });
  
 </script>
 </body>
 </html>
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值