注意jQuery和js的区别:

    <style>
        .one {
            width: 200px;
            height: 200px;
            background-color: pink;
            transition: all .3s;
        }

        .two {
            transform: rotate(720deg);
        }
    </style>
    <div class="one two"></div>
    <script>
        // var one = document.querySelector(".one");
        // one.className = "two";
        // $(".one").addClass("two");  这个addClass相当于追加类名 不影响以前的类名
        $(".one").removeClass("two");
    </script>

 

相关文章:

  • 2022-12-23
  • 2021-06-06
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-07-08
  • 2022-12-23
  • 2021-08-28
相关资源
相似解决方案