-1
$(function(){
var navIsBig = true;
var $nav = $('#header_nav');
$(document).scroll(function() {
var value = $(this).scrollTop();
if (value > 50 && navIsBig){
$nav.animate({height:45},"medium");
$('.box').animate({height:36},"medium");
$('.box').animate({width:78},"medium");
navIsBig = false;
}
else if (value <= 50 && !navIsBig) {
$nav.animate({height:80},"medium");
$('.box').animate({height:53},"medium");
$('.box').animate({width:104},"medium");
navIsBig = true;
}
});
});
此處框縮小其大小,首先是它的高度,然後是它的寬度。但我想對角減小其尺寸...如何在向下滾動時對角減小框尺寸
http://jsfiddle.net/9fact/466/
把高度和寬度一起想:http://jsfiddle.net/lshettyl/9fact/468 / – lshettyl