[Honey汐瑤]同學(xué)你說的這種直接改width的方法,屬于直接改變寬度,沒辦法體現(xiàn)出那個(gè)慢慢變長,慢慢變短的動(dòng)畫效果。老師的代碼里每次增加8px,可以把它改成1px看看效果,再和改變width的比較一下就能看出來不同。
2017-09-02
模仿寫個(gè)jQuery版本有問題請指出
$("li").hover(
function () {
$(this.children[1]).stop().animate({"height":"120px"},200);
},
function () {
$(this.children[1]).stop().animate({"height":"0"},200);
}
)
$("li").hover(
function () {
$(this.children[1]).stop().animate({"height":"120px"},200);
},
function () {
$(this.children[1]).stop().animate({"height":"0"},200);
}
)
2017-08-26