<?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>等待-放飞梦想 &#187; 绝对定位</title>
	<atom:link href="http://leotheme.cn/tag/%e7%bb%9d%e5%af%b9%e5%ae%9a%e4%bd%8d/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Mon, 21 May 2012 09:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>布局中的固定定位</title>
		<link>http://leotheme.cn/javascript/layout-fixed-position.html</link>
		<comments>http://leotheme.cn/javascript/layout-fixed-position.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 03:29:36 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[前端交互]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[固定定位]]></category>
		<category><![CDATA[定位]]></category>
		<category><![CDATA[相对定位]]></category>
		<category><![CDATA[绝对定位]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=749</guid>
		<description><![CDATA[有时候会有某个特殊的需求。如想让某个元素，某块内容固定在页面的某个位置不动，也就是不随滚动条的滚动而滚动。它相对于其他的元素始终是固定的。最近在项目中就有这么一个需求；我们先来熟悉下CSS中关于定位的一些属性: 在CSS中关于定位的内容是：position:relative &#124; absolute &#124; static &#124; fixed 参数： static : 无特殊定位，对象遵循HTML定位规则，不能通过z-index进行层次分级。 absolute : 将对象从文档流中拖出，使用left，right，top，bottom等属性进行绝对定位。而其层叠通过z-index属性定义。此时对象不具有边距，但仍有补白和边框。 relative : 对象不可层叠，但将依据left，right，top，bottom等属性在正常文档流中偏移位置。 fixed : 固定定位，这里他所固定的对像是可视窗口而并非是body或是父级元素。IE5.5及NS6尚不支持此属性。 CSS中定位的层叠分级：z-index: auto &#124; namber; auto 遵从其父对象的定位 namber 无单位的整数值。可为负数 我们知道，要让某个元素固定不动，可以设置这个元素的position属性为fixed；这个属性很好用很强大。但可惜的是万恶的IE6确不支持这个属性。这时候我们得请出传说中的Hack来了： body {&#160; &#160; &#160; margin:&#160;0; &#160; &#160; padding:&#160;0;&#160; &#160; &#160; height:&#160;100%; &#160; &#160; overflow :auto; } #fixedid&#160;{&#160; &#160; &#160; position:&#160;fixed; &#160; &#160; _position:&#160;absolute; /* Hack [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="CSS 3.0 参考手册 (中文版)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fcss-3-0-chm.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197221.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS 3.0 参考手册 (中文版)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谷歌Adsense将推本地电子支付" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fnews%2Fgoogleadsense.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197097.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谷歌Adsense将推本地电子支付</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="功能强大的FLASH Galleryd——dfGallery 2.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Fflash-galleryd-dfgallery-20.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197154.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">功能强大的FLASH Galleryd——dfGallery 2.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Maxthon v1.0[最新修改]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fmaxthonv10new.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198847.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Maxthon v1.0[最新修改]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>有时候会有某个特殊的需求。如想让某个元素，某块内容固定在页面的某个位置不动，也就是不随滚动条的滚动而滚动。它相对于其他的元素始终是固定的。最近在项目中就有这么一个需求；我们先来熟悉下CSS中关于定位的一些属性:</p>
<p>在CSS中关于定位的内容是：position:relative | absolute | static | fixed </p>
<p><strong>参数：</strong></p>
<p>static : 无特殊定位，对象遵循HTML定位规则，不能通过z-index进行层次分级。<br />
<span id="more-749"></span><br />
absolute : 将对象从文档流中拖出，使用left，right，top，bottom等属性进行绝对定位。而其层叠通过z-index属性定义。此时对象不具有边距，但仍有补白和边框。<br />
relative : 对象不可层叠，但将依据left，right，top，bottom等属性在正常文档流中偏移位置。<br />
fixed : 固定定位，这里他所固定的对像是可视窗口而并非是body或是父级元素。IE5.5及NS6尚不支持此属性。</p>
<p>CSS中定位的层叠分级：z-index: auto | namber; </p>
<p>auto 遵从其父对象的定位<br />
namber 无单位的整数值。可为负数</p>
<p>我们知道，要让某个元素固定不动，可以设置这个元素的position属性为fixed；这个属性很好用很强大。但可惜的是万恶的IE6确不支持这个属性。这时候我们得请出传说中的Hack来了：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">body</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">margin:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">0</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">padding:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">0</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">height:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">100</span><span style="color: Red;">%</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">overflow :</span><span style="color: Red;">auto</span><span style="color: Gray;">; </span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Blue;">#fixedid</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">position:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">fixed</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; _</span><span style="color: Green;">position:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">absolute</span><span style="color: Gray;">; /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">Hack</span><span style="color: Gray;"> </span><span style="color: Blue;">for</span><span style="color: Gray;"> </span><span style="color: Blue;">IE6*</span><span style="color: Gray;">/</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">right:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">0</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; _</span><span style="color: Green;">right:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">16</span><span style="color: Red;">px</span><span style="color: Gray;">; /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">Hack</span><span style="color: Gray;"> </span><span style="color: Blue;">for</span><span style="color: Gray;"> </span><span style="color: Blue;">IE6*</span><span style="color: Gray;">/</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">top:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">300</span><span style="color: Red;">px</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">width:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">200</span><span style="color: Red;">px</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">padding:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">10</span><span style="color: Red;">px</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">text-align:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">center</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">font-weight:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">bold</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">background:</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">#0F0</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Blue;">html</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; _</span><span style="color: Green;">overflow:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">hidden</span><span style="color: Gray;">;/</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">Hack</span><span style="color: Gray;"> </span><span style="color: Blue;">for</span><span style="color: Gray;"> </span><span style="color: Blue;">IE6*</span><span style="color: Gray;">/</span></li>
<li><span style="color: Olive;">}</span></li></ol></div>
<p>完整的示例：</p>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_8Bl6A4">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;布局中的固定定位&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
/*&lt;![CDATA[*/
body {
margin: 0;
padding: 0;
height: 100%;
overflow :auto;
}
#fixedid {
position: fixed;
_position: absolute; /* Hack for IE6*/
right: 0;
_right: 16px; /* Hack for IE6*/
top: 300px;
width: 200px;
padding: 10px;
text-align: center;
font-weight: bold;
background: #0F0;
}
html {
_overflow: hidden;/* Hack for IE6*/
}
p {
margin: 50px 0;
}
/*]]&gt;*/
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;fixedid&quot;&gt;
&lt;a href=&quot;http://leotheme.cn&quot; title=&quot;随你怎么拖，我就是不动&quot;&gt;随你怎么拖，我就是不动&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;p&gt;我是用来撑高页面的&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="Util.Code.Run('runcode_8Bl6A4');"/> <input type="button" value="复制" class="runcode_button" onclick="Util.Code.Copy('runcode_8Bl6A4');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p>至此，一个固定布局完成了。但别急着高兴，这个看似简单又完美的东西好是不是真的那么完美呢？答案是：NO；在实际使用中发现了一个问题，如果之前有一天写好了的页面。要你把这个页面的“footer”改成固定布局，当你高兴的把这个任务完成后。高兴的一点刷新的时候。问题来了；如果之前这个页面里有相对定位和绝对定位的布局，你会发现，IE6之前的布局乱了。这个固定定位影响了之前的布局；怎么办？重写之前的布局？一个页面还好说。多了呢？那将会相当麻烦。那有没有更好的办法呢？答案是：YES；有问题就会有解决的办法，不是吗？通过搜索，找到了一个基于JQ的插件。下面来看下这个插件：</p>
<p>jquery插件：任意位置浮动固定层</p>
<p>/*调用：</p>
<p><strong>1 无参数调用：默认浮动在右下角</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></div></div>
<p><strong>2 内置固定位置浮动</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: #ffa500;">//左下角</span><span style="color: Gray;"><br />$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">(</span><span style="color: Gray;">”</span><span style="color: Blue;">leftbottom</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: #ffa500;">//右下角</span><span style="color: Gray;"><br />$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">(</span><span style="color: Gray;">”</span><span style="color: Blue;">rightbottom</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: #ffa500;">//左上角</span><span style="color: Gray;"><br />$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">(</span><span style="color: Gray;">”</span><span style="color: Blue;">lefttop</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: #ffa500;">//右上角</span><span style="color: Gray;"><br />$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">(</span><span style="color: Gray;">”</span><span style="color: Blue;">righttop</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: #ffa500;">//居中</span><span style="color: Gray;"><br />$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">(</span><span style="color: Gray;">”</span><span style="color: Blue;">middle</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></div></div>
<p>另外新添加了四个新的固定位置方法</p>
<p>middletop（居中置顶）、middlebottom（居中置低）、leftmiddle（靠左居中）、rightmiddle（靠右居中）</p>
<p><strong>3 自定义位置浮动</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">$</span><span style="color: Olive;">(</span><span style="color: Gray;">”#</span><span style="color: Blue;">id</span><span style="color: Gray;">”</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">floatdiv</span><span style="color: Olive;">({</span><span style="color: Blue;">left</span><span style="color: Gray;">:”</span><span style="color: Maroon;">10</span><span style="color: Blue;">px</span><span style="color: Gray;">”,</span><span style="color: Blue;">top</span><span style="color: Gray;">:”</span><span style="color: Maroon;">10</span><span style="color: Blue;">px</span><span style="color: Gray;">”</span><span style="color: Olive;">})</span><span style="color: Gray;">;</span></div></div>
<p>以上参数，设置浮动层在left 10个像素,top 10个像素的位置</p>
<p>可以看出这个插件相当强大。至少对于固定某个元素来说是非常强大。内置了常见的位置。支持自定义位置；而且解决了上面的那个问题。更详细的说明和下载请<a href="http://www.cnblogs.com/regedit/archive/2008/03/11/1100170.html">点击这里</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Opera中国版“朱雀”正式发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fnews%2Fopera-china-96.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197076.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Opera中国版“朱雀”正式发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="寻找Photoshop笔刷的15个好去处" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2F15-photoshop-brush-web.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197124.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">寻找Photoshop笔刷的15个好去处</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="给你的侧边栏添加一个登陆入口" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fadd-login-window-at-sidebar.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197290.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">给你的侧边栏添加一个登陆入口</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS中关于背景图的应用技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fabout-css-background.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6199351.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS中关于背景图的应用技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="酷狗推出手机版" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fnews%2Fkugoumobile.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Flayout-fixed-position.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197397.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">酷狗推出手机版</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">随机日志</h3><ul class="related_post"><li>2009-06-13 -- <a href="http://leotheme.cn/wordpress/wordpresstheme-dreamy2-0.html" title="主题Dreamy更新到v2.0 [06-18 00:08]">主题Dreamy更新到v2.0 [06-18 00:08]</a> (61)<br /><small>距离这个主题发布上一版已经差不多两个月了，而这个主题我一直在修修改改。虽然很多同学问我要我BLOG用的版本，但很多地方没有完善，所以一直没有发布自己用的版本。但现在好了，终于可以发布这个新的版本了。这...</small></li><li>2008-10-08 -- <a href="http://leotheme.cn/javascript/csssanjiaocode.html" title="一些三角形的CSS写法">一些三角形的CSS写法</a> (1)<br /><small>多的就不说了,很简单的写法,大家直接运行看效果




www.leotheme.cn


/*leotheme.cn*/
body{ margin:0 auto; text-ali...</small></li><li>2008-10-21 -- <a href="http://leotheme.cn/javascript/jquerytocheckbox.html" title="jQuery 对checkbox的操作">jQuery 对checkbox的操作</a> (5)<br /><small>很久没有写JQuery的文章了。今天来看下JQ对天Checkbox复选框的操作。
看下面的一个小例子。在这个例子中包括了以下几个功能

	1. 全选
	2. 取消全选
	3. 选中所有奇数...</small></li><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li><li>2008-09-11 -- <a href="http://leotheme.cn/javascript/jqueryforwpgoodone.html" title="jquery基础教程一[click,addClass,show,hide]">jquery基础教程一[click,addClass,show,hide]</a> (3)<br /><small>原创内容—转载请说明出处.

jQuery我想很多人都知道，但用WP的好像很少有人说到这个。今天开始和大家一起来研究下如何用jQuery来为我们的WP添加实用的功能。至于jQuery的相关背景和资...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/javascript/layout-fixed-position.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

