Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想以速度为我的 li 做一个边界底部。我该如何解决这个问题?
我的代码:
$(document).ready(function(){ $("#mi").mouseover(function(){ $("#mi").css({"border-bottom": "1px solid #fff"}); },800); });
您需要为border-bottom-width属性设置动画。
border-bottom-width
$(document).ready(function() { $("#mi").mouseover(function() { $("#mi").css({ "border-bottom": "0px solid #fff" }).animate({ borderBottomWidth: 1 }, 500);; }); });