如何制作一个固定的div?

taa*_*eid 7 html css fixed

我正在尝试将框固定在页面的右下边框中,并且不会随着页面向下滚动而移动.但它不适合我,为什么不知道.这是我的代码:

<html>
 <head>

 <style type="text/css">

.tooltip {
 width: 200px;
 position: fixed;
 top:auto;
 bottom:0px;
 right:0px;
 left:auto;
}
 </style>
 </head> 
<body>
<div class="tooltip">
   <div class="tooltip_top">1</div>
   <div class="tooltip_con">2</div>
   <div class="tooltip_bot">3</div>
 </div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Gab*_*oli 10

它在FF和Chrome中运行良好..

旧版本的IE没有position:fixed正确支持..不确定最新版本..

还要确保定义了doctype ..


小智 7

.tooltip {
 width: 200px;
 position: fixed;
 bottom:0px;
 right:0px;
}
Run Code Online (Sandbox Code Playgroud)