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;......} 針對(duì)IE7、Opera、Firefox一行搞定
</style>
IE6中利用容器對(duì)溢出內(nèi)容的處理方式來(lái)實(shí)現(xiàn)的
<!--[if IE 6]> 利用IE獨(dú)有的條件語(yǔ)句可以針對(duì)不同的IE版本精確設(shè)置,同時(shí)避免了這些代碼被其他瀏覽器讀到
<style type="text/css">
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#fixed{position:absolute;right:17px;}
fixed元素的絕對(duì)位置是相對(duì)于HTML元素來(lái)說(shuō),而滾動(dòng)條是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)之舞