當減小的像素>2*border的像素 就能正常減小
border:4px solid black;
odiv.style.width=odiv.offsetWidth-9+'px'; 9>2*4
border:4px solid black;
odiv.style.width=odiv.offsetWidth-9+'px'; 9>2*4
實際上一句就可以了,animate有隊列功能,不用回調(diào)函數(shù),并且因為jQ有方法鏈接功能,直接鏈在一起就可以了。
$(this).find('i').animate({top:"-25px",opacity:'0'},300).animate({top:"30px"}).animate({top:"20px", opacity:'1'},300);
參考資料:http://www.w3school.com.cn/jquery/jquery_chaining.asp
$(this).find('i').animate({top:"-25px",opacity:'0'},300).animate({top:"30px"}).animate({top:"20px", opacity:'1'},300);
參考資料:http://www.w3school.com.cn/jquery/jquery_chaining.asp
2017-02-13
http://pan.baidu.com/s/1kVqeuGZ 看到好多求源碼的,小白手打的源碼,各位有需要的湊合看看吧,大家相互參考下,共同進步,對css還不是很熟練,搞了半天才弄出來,各位多多多指教。
2017-02-04