<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.3.1.min.js"></script>
    <style>
        #flipshow, #content, #fliphide, #toggle{
            padding: 5px;
            text-align: center;
            background-color: blueviolet;
            border: solid 1px; red;
        }
        #content{
            padding: 50px;
            display: none;
        }
    </style>
</head>
<body>
<div >显示</div>
<div >隐藏</div>
<div >toggle</div>
<div >hello world</div>
</body>
<script>
    $("#flipshow").click(function(){
        $("#content").slideDown(1000);
    })

    $("#fliphide").click(function(){
        $("#content").slideUp(1000);
    })

    $("#toggle").click(function(){
        $("#content").slideToggle(1000);
    })
</script>
</html>

相关文章:

  • 2021-08-05
  • 2022-03-06
  • 2022-12-23
  • 2021-12-20
  • 2021-12-09
  • 2017-12-17
  • 2019-05-24
  • 2021-11-11
猜你喜欢
  • 2021-12-02
  • 2021-08-28
  • 2021-10-15
  • 2021-11-26
  • 2021-09-28
相关资源
相似解决方案