一、用到的方法:
1. 获取 / 设置属性: $("#id名"). prop("属性名",“属性值”);
2. 向下滑动显示图片的动画:$("#id名"). slideDown(speed,ease,fn);
3. 向上退出图片的动画:$("#id名"). slideUp(speed,ease,fn);
4. 一次性定时器:setTimeout(函数,时间);
 
二、代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>弹窗</title>
<script src="jquery-3.3.1.min.js"></script>
</head>
<script>
$(function(){
setTimeout(function(){
$("#one").prop("src","img/01.jpg");
$("#one").slideDown(2000,"linear");
},3000);
 
setTimeout(function(){
$("#one").slideUp(2000);
},7000);
});
</script>
<body>
<img src="" alt="" style="width: 300px;height: 200px; display: none" id="one">
</body>
</html>
 

相关文章:

  • 2021-05-23
  • 2021-05-06
  • 2021-11-14
  • 2022-12-23
  • 2021-09-17
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-10-03
  • 2021-05-18
  • 2021-10-30
相关资源
相似解决方案