jquery center内容到页面

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jquery center内容到页面相关的知识,希望对你有一定的参考价值。

  1. jQuery.fn.center = function () {
  2. this.css("position","absolute");
  3. this.css("top", ( $(window).height() - this.height() ) / $(window).scrollTop() + "px");
  4. this.css("left", ( $(window).width() - this.width() ) / $(window).scrollLeft() + "px");
  5. return this;
  6. }

以上是关于jquery center内容到页面的主要内容,如果未能解决你的问题,请参考以下文章

Jquery UI选项卡 - 将整个Div /容器居中

使用 jQuery 将内容从 HTTP 页面加载到 HTTPS 页面

用jquery怎么获取页面的特定内容

用jquery怎么获取页面的特定内容

滚动到页面底部 100px 时,jQuery 加载内容,触发多个事件

两个网页中的内容,jQuery怎样把其中一个网页中标签中的内容复制到另一网页中显示出来?