jQuery CSS 操作
jQuery 拥有三种用于 CSS 操作的重要函数:
- $(selector).css(name,value)
- $(selector).css({properties})
- $(selector).css(name)[……]
jQuery CSS 操作
jQuery 拥有三种用于 CSS 操作的重要函数:
alert($(window).height()); //浏览器时下窗口可视区域高度
alert($(document).height()); //浏览器时下窗口文档的高度
alert($(document.body).height());//浏览器时下窗口文档body的[......]获取页面某一元素的绝对X,Y坐标,可以用offset():
var X = $('#DivID').offset().top;var Y = $('#DivID').offset().left;获取相对(父元素)位[……]