Js上卷上拉
来自CloudWiki
<!DOCTYPE html> <html> <head>
<meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>上卷下拉</title> <link rel="stylesheet" href=""> <script src="js/jquery.min.js"></script> <style> .box{ width:500px; height:400px; background-color: orange; } </style> <script> $(function(){ $(".up").click(function(){ $(".box").slideUp(5000,"linear",function(){ alert("动画执行完毕") }); }) $(".down").click(function(){ $(".box").slideDown("fast");//slow 600ms 默认400ms fast 200ms }); $(".toggle").click(function(){ $(".box").slideToggle(2000) }) }) </script>
</head> <body> <button class="up">上卷</button> <button class="down">下拉</button> <button class="toggle">切换</button>
</body> </html>