0

我想以速度为我的 li 做一个边界底部。我该如何解决这个问题?

我的代码:

    $(document).ready(function(){
        $("#mi").mouseover(function(){
            $("#mi").css({"border-bottom": "1px solid #fff"});
        },800);
    });
4

1 回答 1

1

您需要为border-bottom-width属性设置动画。

$(document).ready(function() {
  $("#mi").mouseover(function() {
    $("#mi").css({
      "border-bottom": "0px solid #fff"
    }).animate({
      borderBottomWidth: 1
    }, 500);;
  });
});

于 2019-12-30T21:04:45.813 回答