Javascript 为什么不是';在jquery中不能使用这种反弹效果吗?

Javascript 为什么不是';在jquery中不能使用这种反弹效果吗?,javascript,jquery,html,effect,bounce,Javascript,Jquery,Html,Effect,Bounce,为什么不起作用我们,成员和收听是将您重定向到另一个页面的标题,我的目的是当您的鼠标在其中一个按钮上时使它们弹跳 HTML: 在动画中使用hover/mouseenter是很有意思的,但至少使用CSS会有更多的控制。试试这个 .asd{ position: relative } .asd:hover{ animation: bounceText .5s; -webkit-animation: bounceText .5s; } @-webkit-keyframes bo

为什么不起作用<代码>我们,
成员
收听
是将您重定向到另一个页面的标题,我的目的是当您的鼠标在其中一个按钮上时使它们弹跳

HTML:


在动画中使用hover/mouseenter是很有意思的,但至少使用CSS会有更多的控制。试试这个

.asd{
    position: relative
}

.asd:hover{
    animation: bounceText .5s;
    -webkit-animation: bounceText .5s;
}

@-webkit-keyframes bounceText {
    0%     {top: 0px;}
    50% {top: 10px;}
    100%   {top: 0px;}
}

@keyframes bounceText {
    0%     {top: 0px;}
    50% {top: 10px;}
    100%   {top: 0px;}
}

你已经包括jquery ui库了吗?是的,我确实包括了jquery ui库看到这把小提琴了,你的代码正在工作,这代码正在工作
 $(document).ready(function() {

      $(".asd").mouseenter(function(){
         $(".asd").effect( "bounce", 
          {times:3}, 300 );
      });
 });
.asd{
    position: relative
}

.asd:hover{
    animation: bounceText .5s;
    -webkit-animation: bounceText .5s;
}

@-webkit-keyframes bounceText {
    0%     {top: 0px;}
    50% {top: 10px;}
    100%   {top: 0px;}
}

@keyframes bounceText {
    0%     {top: 0px;}
    50% {top: 10px;}
    100%   {top: 0px;}
}