Fixed Position
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
......
<style type="text/css">
#fixed{position:fixed;top:5em;right:0;......} 針對IE7、Opera、Firefox一行搞定
</style>
IE6中利用容器對溢出內(nèi)容的處理方式來實現(xiàn)的
<!--[if IE 6]> 利用IE獨有的條件語句可以針對不同的IE版本精確設(shè)置,同時避免了這些代碼被其他瀏覽器讀到
<style type="text/css">
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#fixed{position:absolute;right:17px;}
fixed元素的絕對位置是相對于HTML元素來說,而滾動條是body元素的,這是設(shè)置right:17px的原因
</style>
<![endif]-->
<!--[if lt IE 6]>
<style type="text/css">
#fixed{position:absolute;top:expression(eval(document.body.scrollTop + 50));}
</style>
<![endif]-->
</head>
<body>
<div id="wrapper">
......
</div>
<div id="fixed"><h2>{position:fixed}</h2></div>
</body>
</html>
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞
- 隨網(wǎng)之舞