效果很眩,当鼠标停止5秒不动时,隐藏页面的某些部分,
?
再动一下鼠标又出现。
?
效果:?http://xheight.co.uk/
1 楼
sniciq
2011-11-10
xheight.onMouseMove = function()
{
xheight.mouseIdle = false;
clearTimeout(xheight.mouseTimeout);
xheight.mouseTimeout = setTimeout(xheight.onMouseTimeout, 5000);
docObj.removeClass('mouse-idle');
};
xheight.onMouseTimeout = function()
{
if (xheight.mouseIdle) return;
xheight.mouseIdle = true;
clearTimeout(xheight.mouseTimeout);
docElement.className += ' mouse-idle';
};
没啥难的!
{
xheight.mouseIdle = false;
clearTimeout(xheight.mouseTimeout);
xheight.mouseTimeout = setTimeout(xheight.onMouseTimeout, 5000);
docObj.removeClass('mouse-idle');
};
xheight.onMouseTimeout = function()
{
if (xheight.mouseIdle) return;
xheight.mouseIdle = true;
clearTimeout(xheight.mouseTimeout);
docElement.className += ' mouse-idle';
};
没啥难的!
2 楼
ego008
2011-11-10
技术上不难,创意难。