jQuery简单实现页面元素置顶时悬浮效果示例

前端之家收集整理的这篇文章主要介绍了jQuery简单实现页面元素置顶时悬浮效果示例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

本文实例讲述了jQuery简单实现页面元素置顶时悬浮效果方法分享给大家供大家参考,具体如下:

一、JS Code:

top) { if (window.XMLHttpRequest) { element.css({ position: "fixed",top: 0 }); } else { element.css({ top: scrolls }); } } else { element.css({ position: pos,top: top }); } }); }; return $(this).each(function () { position($(this)); }); }; //绑定 $("#float").smartFloat();

二、Html Code:

置顶时悬浮的区域























更多关于jQuery相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》、《》、《》、《》、《》及《

希望本文所述对大家jQuery程序设计有所帮助。

原文链接:https://www.f2er.com/jquery/46945.html

猜你在找的jQuery相关文章