<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jq之demo</title> <!--线上jq库--> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script> $(document).ready(function(){ $("#flip").click(function(){ /*滑下面板*/ $("#panel").slideDown(5000); }); $("#stop").click(function () { $("#panel").stop(); }) }); </script> <style type="text/css"> #panel,#flip { padding: 5px; text-align: center; background-color: #c3c3c3; border:solid 1px #e5eecc; } #panel{ padding: 50p; display: none; } </style> </head> <body> <button id="stop">停止滑动</button> <div id="flip">点我滑下面板</div> <div id="panel">Hi</div> </html>
jq之slideDown() stop()
最新推荐文章于 2023-07-08 22:31:08 发布