<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>春去花还在-CoLee★＂ &#187; 坐标</title>
	<atom:link href="http://colee.99n9.com/tag/%e5%9d%90%e6%a0%87/feed/" rel="self" type="application/rss+xml" />
	<link>http://colee.99n9.com</link>
	<description>CoLee的网页设计制作素材、html、javacript、ajax代码精心自编或修改收藏，欢迎大家共享与交流。</description>
	<lastBuildDate>Tue, 04 Aug 2009 03:51:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>offset与scroll等坐标函数介绍</title>
		<link>http://colee.99n9.com/offset%e4%b8%8escroll%e7%ad%89%e5%9d%90%e6%a0%87%e5%87%bd%e6%95%b0%e4%bb%8b%e7%bb%8d/</link>
		<comments>http://colee.99n9.com/offset%e4%b8%8escroll%e7%ad%89%e5%9d%90%e6%a0%87%e5%87%bd%e6%95%b0%e4%bb%8b%e7%bb%8d/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 08:02:55 +0000</pubDate>
		<dc:creator>CoLee★＂</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[div+css]]></category>
		<category><![CDATA[offset]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[坐标]]></category>

		<guid isPermaLink="false">http://colee.99n9.com/?p=174</guid>
		<description><![CDATA[获取大小的属性有 CSS ( 大小 +border) 属性对应的 offset 长宽属性（无标准的实事标准）： 
1. offsetWidth
获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的宽度。 
与 CSS width + border 对应 
2. offsetHeight 获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度。  
与 CSS height + border 对应 
CSS ( 大小 -padding ) 属性对应的 client 长宽属性（无标准的实事标准）：  
3. clientWidth
获取对象的宽度，不计算任何边距、边框、滚动条或可能应用到该对象的补白。 
与 CSS width - 滚动条宽度 ( 如果有 ) 
对应 
4. clientHeight
获取对象的高度，不计算任何边距 (margin) 、边框、滚动条或可能应用到该对象的补白 (padding) 。 
与 [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span>获取大小的属性有 </span></strong><span style="color: #000000;"><span style="font-family: Times New Roman;"><strong>CSS (</strong> </span><span><strong>大小</strong> </span><span style="font-family: Times New Roman;"><strong>+border)</strong> </span><span><strong>属性对应的</strong> </span><span style="font-family: Times New Roman;"><strong><span>offset</span></strong> </span><span><strong>长宽属性（无标准的实事标准）：</strong> </span></span><strong><br />
<span style="font-family: Times New Roman;"><strong><em><span style="color: #000000;">1.</span> </em></strong><span style="color: #000000;"><strong>offsetWidth</strong><br />
</span></span><span style="color: #000000;"><em><span>获取对象相对于版面或由父坐标</span> <span style="font-family: Times New Roman;">offsetParent </span></em><em><span>属性指定的父坐标的宽度。</span> </em></span><br />
<span><span style="color: #000000;">与</span> </span><span style="font-family: Times New Roman;"><span style="color: #000000;">CSS </span><span style="color: #0000ff;">width + border</span> </span><span style="color: #000000;"><span>对应</span> </span><br />
<span style="font-family: Times New Roman;"><strong><span style="color: #000000;">2.</span> </strong><span style="color: #000000;"><strong>offsetHeight</strong> </span></span><span style="color: #000000;"><em><span>获取对象相对于版面或由父坐标</span> <span style="font-family: Times New Roman;">offsetParent </span></em><em><span>属性指定的父坐标的高度。</span> </em><span style="font-family: Times New Roman;"> </span></span><br />
<span><span style="color: #000000;">与</span> </span><span style="font-family: Times New Roman;"><span style="color: #000000;">CSS</span> <span style="color: #0000ff;">height + border</span> </span><span style="color: #000000;"><span>对应</span> </span><br />
<span style="color: #000000;"><span style="font-family: Times New Roman;">CSS (</span> <span>大小</span> <span style="font-family: Times New Roman;">-padding )</span> <span>属性对应的</span> <span style="font-family: Times New Roman;">client</span> <span>长宽属性（无标准的实事标准）：</span> <span style="font-family: Times New Roman;"> </span></span><br />
<span style="font-family: Times New Roman;"><strong><span style="color: #000000;">3.</span> </strong><span style="color: #000000;"><strong>clientWidth</strong><br />
</span></span><span style="color: #000000;"><span>获取对象的宽度，不计算任何边距、边框、滚动条或可能应用到该对象的补白。</span> </span><br />
<span><span style="color: #000000;">与</span> </span><span style="font-family: Times New Roman;"><span style="color: #000000;">CSS </span><span style="color: #0000ff;">width -</span> </span><span style="color: #0000ff;"><span><strong>滚动条宽度</strong> </span></span><span style="color: #0000ff;"><strong><span style="font-family: Times New Roman;">(</span> </strong></span><span style="color: #0000ff;"><span><strong>如果有</strong> </span></span><span style="font-family: Times New Roman;"><span style="color: #0000ff;"><strong>)</strong> </span><br />
</span><span style="color: #000000;"><span>对应</span> </span><br />
<span style="font-family: Times New Roman;"><strong><span style="color: #000000;">4.</span> </strong><span style="color: #000000;"><strong>clientHeight</strong><br />
</span></span><span style="color: #000000;"><span>获取对象的高度，不计算任何边距</span> <span style="font-family: Times New Roman;">(margin)</span> <span>、边框、滚动条或可能应用到该对象的补白</span> <span style="font-family: Times New Roman;">(padding)</span> <span>。</span> </span><br />
<span><span style="color: #000000;">与</span> </span><span style="font-family: Times New Roman;"><span style="color: #000000;">CSS </span><span style="color: #0000ff;">height -</span> </span><span style="color: #0000ff;"><span><strong>滚动条宽度</strong> </span></span><span style="color: #0000ff;"><strong><span style="font-family: Times New Roman;">(</span> </strong></span><span style="color: #0000ff;"><span><strong>如果有</strong> </span></span><span style="font-family: Times New Roman;"><span style="color: #0000ff;"><strong>)</strong> </span><br />
</span><span style="color: #000000;"><span>对应</span> </span></p>
<p><strong><span style="color: #000000;"><span>获取位置信息的属性有：</span> </span></strong><br />
<span style="color: #000000;"><span>几个</span> <span style="font-family: Times New Roman;"><span>offset</span></span> <span>属性（无标准的实事标准）：</span> </span><br />
<span style="color: #000000;"><span style="font-family: Times New Roman;"><span>offset</span> </span><span>坐标</span> <span style="font-family: Times New Roman;">0</span> <span>点是</span> <span style="font-family: Times New Roman;">offsetParent</span> <span>元素</span> <span style="font-family: Times New Roman;">content</span> <span>区域的左上点</span> </span><br />
<span style="font-family: Times New Roman;"><strong><span style="color: #000000;">5.</span> </strong><span style="color: #000000;"><strong>offsetParent</strong><br />
</span></span><span style="color: #000000;"><span>获取定义对象</span> <span style="font-family: Times New Roman;">offsetTop </span><span>和</span> <span style="font-family: Times New Roman;">offsetLeft </span><span>属性的容器对象的引用。</span> </span><br />
<span style="color: #000000;"><span style="font-family: Times New Roman;">CSS persition = absolute</span> <span>时，</span> <span style="font-family: Times New Roman;">left,top </span><span>属性值参照的元素。</span> </span><br />
<span style="color: #000000;"><em><span style="font-family: Verdana;">Object is positioned relative to parent element&#8217;s position—or to the body object if its parent element is not positioned—using the top and left properties.</span> </em></span><br />
<span style="font-family: Times New Roman;"><strong><span style="color: #000000;">6.</span> </strong><span style="color: #000000;"><strong>offsetLeft</strong><br />
</span></span><span style="color: #000000;"><em><span>获取对象相对于版面或由</span> <span style="font-family: Times New Roman;">offsetParent </span></em><em><span>属性指定的父坐标的计算左侧位置。</span> </em></span><br />
<span><span style="color: #000000;">与</span> </span><span style="font-family: Times New Roman;"><span style="color: #000000;">CSS </span><span style="color: #0000ff;">left(</span> </span><span style="color: #0000ff;"><span style="font-family: Verdana;">absolute</span> </span><span style="color: #0000ff;"><span style="font-family: Times New Roman;">)+margin</span> </span><span style="color: #000000;"><span>对应</span> </span><br />
<span style="color: #000000;"><span style="font-family: Times New Roman;"><strong>7.</strong> <strong>offsetTop</strong><br />
</span><span>获取对象相对于版面或由</span> <span style="font-family: Times New Roman;">offsetTop </span><span>属性指定的父坐标的计算顶端位置。</span> </span><br />
<span><span style="color: #000000;">与</span> </span><span style="font-family: Times New Roman;"><span style="color: #000000;">CSS </span><span style="color: #0000ff;">top(absolute)+margin</span> </span><span><span style="color: #000000;">对应 </span></span></strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>scrollHeight: 获取对象的滚动高度。<br />
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离<br />
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离<br />
scrollWidth:获取对象的滚动宽度<br />
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度<br />
offsetLeft:获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置<br />
offsetTop:获取对象相对于版面或由 offsetTop 属性指定的父坐标的计算顶端位置<br />
event.clientX 相对文档的水平座标<br />
event.clientY 相对文档的垂直座标<br />
event.offsetX 相对容器的水平坐标<br />
event.offsetY 相对容器的垂直坐标<br />
document.documentElement.scrollTop 垂直方向滚动的值<br />
event.clientX+document.documentElement.scrollTop 相对文档的水平座标+垂直方向滚动的量<br />
以上主要指IE之中，FireFox差异如下：<br />
IE6.0、FF1.06+：<br />
clientWidth = width + padding<br />
clientHeight = height + padding<br />
offsetWidth = width + padding + border<br />
offsetHeight = height + padding + border<br />
IE5.0/5.5：<br />
clientWidth = width &#8211; border<br />
clientHeight = height &#8211; border<br />
offsetWidth = width<br />
offsetHeight = height </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://colee.99n9.com/offset%e4%b8%8escroll%e7%ad%89%e5%9d%90%e6%a0%87%e5%87%bd%e6%95%b0%e4%bb%8b%e7%bb%8d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>鼠标及对象坐标控制属性</title>
		<link>http://colee.99n9.com/%e9%bc%a0%e6%a0%87%e5%8f%8a%e5%af%b9%e8%b1%a1%e5%9d%90%e6%a0%87%e6%8e%a7%e5%88%b6%e5%b1%9e%e6%80%a7/</link>
		<comments>http://colee.99n9.com/%e9%bc%a0%e6%a0%87%e5%8f%8a%e5%af%b9%e8%b1%a1%e5%9d%90%e6%a0%87%e6%8e%a7%e5%88%b6%e5%b1%9e%e6%80%a7/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 07:58:51 +0000</pubDate>
		<dc:creator>CoLee★＂</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[坐标]]></category>
		<category><![CDATA[鼠标]]></category>

		<guid isPermaLink="false">http://colee.99n9.com/?p=171</guid>
		<description><![CDATA[offsetTop
获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算顶端位置。
offsetLeft
获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置。
offsetHeight
获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度。
IE、Opera 认为 offsetHeight = clientHeight + 滚动条 + 边框。
NS、FF 认为 offsetHeight 是网页内容实际高度，可以小于 clientHeight。
offsetWidth
获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的宽度。
offsetParent
获取定义对象 offsetTop 和 offsetLeft 属性的容器对象的引用。
clientHeight
获取对象的高度，不计算任何边距、边框、滚动条或可能应用到该对象的补白。
大家对 clientHeight 都没有什么异议，都认为是内容可视区域的高度，也就是说页面浏览器中可以看到内容的这个区域的高度，一般是最后一个工具条以下到状态栏以上的这个区域，与页面内容无关。
clientLeft
获取 offsetLeft 属性和客户区域的实际左边之间的距离。
clientTop
获取 offsetTop 属性和客户区域的实际顶端之间的距离。
clientWidth
获取对象的宽度，不计算任何边距、边框、滚动条或可能应用到该对象的补白。
SCROLL属性
scroll
设置或获取滚动是否关闭。
scrollHeight
获取对象的滚动高度。
scrollLeft
设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离。
scrollTop
设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离。
scrollWidth
获取对象的滚动宽度。
event属性
x
设置或获取鼠标指针位置相对于父文档的 x 像素坐标。
screenX
设置或获取获取鼠标指针位置相对于用户屏幕的 x 坐标
offsetX
设置或获取鼠标指针位置相对于触发事件的对象的 x 坐标。
clientX
设置或获取鼠标指针位置相对于窗口客户区域的 x 坐标，其中客户区域不包括窗口自身的控件和滚动条
]]></description>
			<content:encoded><![CDATA[<p>offsetTop<br />
获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算顶端位置。</p>
<p>offsetLeft<br />
获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置。</p>
<p>offsetHeight<br />
获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度。<br />
IE、Opera 认为 offsetHeight = clientHeight + 滚动条 + 边框。<br />
NS、FF 认为 offsetHeight 是网页内容实际高度，可以小于 clientHeight。</p>
<p>offsetWidth<br />
获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的宽度。</p>
<p>offsetParent<br />
获取定义对象 offsetTop 和 offsetLeft 属性的容器对象的引用。</p>
<p>clientHeight<br />
获取对象的高度，不计算任何边距、边框、滚动条或可能应用到该对象的补白。<br />
大家对 clientHeight 都没有什么异议，都认为是内容可视区域的高度，也就是说页面浏览器中可以看到内容的这个区域的高度，一般是最后一个工具条以下到状态栏以上的这个区域，与页面内容无关。</p>
<p>clientLeft<br />
获取 offsetLeft 属性和客户区域的实际左边之间的距离。</p>
<p>clientTop<br />
获取 offsetTop 属性和客户区域的实际顶端之间的距离。</p>
<p>clientWidth<br />
获取对象的宽度，不计算任何边距、边框、滚动条或可能应用到该对象的补白。</p>
<p>SCROLL属性<br />
scroll<br />
设置或获取滚动是否关闭。</p>
<p>scrollHeight<br />
获取对象的滚动高度。</p>
<p>scrollLeft<br />
设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离。</p>
<p>scrollTop<br />
设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离。</p>
<p>scrollWidth<br />
获取对象的滚动宽度。</p>
<p>event属性<br />
x<br />
设置或获取鼠标指针位置相对于父文档的 x 像素坐标。</p>
<p>screenX<br />
设置或获取获取鼠标指针位置相对于用户屏幕的 x 坐标</p>
<p>offsetX<br />
设置或获取鼠标指针位置相对于触发事件的对象的 x 坐标。</p>
<p>clientX<br />
设置或获取鼠标指针位置相对于窗口客户区域的 x 坐标，其中客户区域不包括窗口自身的控件和滚动条</p>
]]></content:encoded>
			<wfw:commentRss>http://colee.99n9.com/%e9%bc%a0%e6%a0%87%e5%8f%8a%e5%af%b9%e8%b1%a1%e5%9d%90%e6%a0%87%e6%8e%a7%e5%88%b6%e5%b1%9e%e6%80%a7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

