<!-- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" --> <html> <head> <mce:style type="text/css"><!-- #fixed{position:fixed;top:5em;right:0;} --></mce:style><style type="text/css" mce_bogus="1">#fixed{position:fixed;top:5em;right:0;} </style> <!--[if IE 6]> <mce:style type="text/css"><!-- html{overflow:hidden;} body{height:100%;overflow:auto;} #fixed{position:absolute;right:17px;} //fixed元素的绝对位置是相对于HTML元素来说,滚动条是body元素的,这是设置right:17px的原因 --></mce:style><style type="text/css" mce_bogus="1">html{overflow:hidden;} body{height:100%;overflow:auto;} #fixed{position:absolute;right:17px;} //fixed元素的绝对位置是相对于HTML元素来说,滚动条是body元素的,这是设置right:17px的原因</style> <![endif]--> <!--[if lt IE 6]> <mce:style type="text/css"><!-- #fixed{position:absolute;top:expression(eval(document.body.scrollTop + 50));} --></mce:style><style type="text/css" mce_bogus="1">#fixed{position:absolute;top:expression(eval(document.body.scrollTop + 50));}</style> <![endif]--> </head> <body> <div id="fixed"> <table cellspacing="0" cellpadding="0"><tbody style="background: none repeat scroll 0% 0% transparent;" mce_style="background: none repeat scroll 0% 0% transparent;"><tr> <td style="background: none repeat scroll 0% 0% transparent;" mce_style="background: none repeat scroll 0% 0% transparent;"> <img style="cursor: pointer;" mce_style="cursor: pointer;" src="http://v2.jiathis.com/code/images/r1.gif" mce_src="http://v2.jiathis.com/code/images/r1.gif" id="jiathis_a"></td> </tr></tbody></table></div> 来源:http://dancewithnet.com/2007/04/19/cross-brower-css-fixed-position/