让div固定在顶部不随滚动条滚动

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>chinmo.net</title>
<style type="text/css">
body{
margin:0px;
padding:0px;
}
#glideDiv0{position:fixed; top:0;left:0; width:100%; background:#F00;}
</style>
<!--[if IE 6]>
<style type="text/css">
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#glideDiv0{position:absolute;}
</style>
<![endif]-->
</head>
<body>
<div id="glideDiv0">
固定顶部不动
</div>
<div id="wrap_outer">
<br/><br/>固定Div,且scroll时Div不闪动。
<br/><br/>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
<br/><br/>bbbb
</div> </body>
</html>

让div固定在顶部不随滚动条滚动【转】的更多相关文章

  1. 让div固定在顶部不随滚动条滚动

    让div固定在顶部不随滚动条滚动 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "h ...

  2. Jquery当div超出页面时就固定到顶部否则跟随页面滚动

    $.fn.smartFloat = function () { var position = function (element) { var top = element.position().top ...

  3. bootstrap div 固定

    div固定在顶部样式: .navbar-fixed-top div固定在底部样式 .navbar-fixed-bottom

  4. 返回顶部的功能 div固定在页面位置不变

    1.你在网上搜索的时候,可能会搜索到div固定在页面上,不随滚动条滚动而滚动是用CSS写的,写法是position:fixed;bottom:0; 但是这个在iframe满地跑的页面实际开发中,有啥用 ...

  5. 把div固定在网页顶部

    很多网站都有把某一块固定在顶部的功能,今天上网搜搜然后自己又写了一遍,贴出来给大家看看,哪天用到的时候自己也可以随时看看 <!DOCTYPE html PUBLIC "-//W3C// ...

  6. 滚动页面时DIV到达顶部时固定在顶部

    本示例使用Javascript实现了滚动页面时,DIV到达顶部时固定在顶部.在IE下效果有点闪,效果网址:http://www.keleyi.com/keleyi/phtml/fixdiv.htm 下 ...

  7. css固定div头部 滚动条滚动内容

    页面布局,固定头部,滚动下方内容 实际场景 在制作页面的时候,经常会遇到要这样的情况:整个页面,整体分三大模块,头部固定,内容区域,左边固定,右边可以滚动. 最终想要的效果 案例源码 <!DOC ...

  8. CSS Div固定在网页顶部、底部、左侧、右侧

    Div固定在网页顶部 .header { width:100%; height:80px; background-color:#FAFAFA; position:fixed; top:; left:; ...

  9. div固定在浏览器的最上方,不随滚动条滚动

    #topDIV { position: fixed; ; ; width: 100%; height: 35px; border-bottom: 1px solid #eee; background- ...

随机推荐

  1. 77 Linux commands and utilities you'll actually use

    https://searchdatacenter.techtarget.com/tutorial/77-Linux-commands-and-utilities-youll-actually-use

  2. How to leave the open file in eclipse tab after search?

    https://superuser.com/questions/130353/how-to-leave-the-open-file-in-eclipse-tab-after-search From m ...

  3. [转帖]Windows7 结束更新 以及后期更新花费。

    你不应该为Windows 7更新付费的三个原因 https://www.linuxidc.com/Linux/2019-02/156777.htm 对Windows 7的支持将在2020年1月结束,这 ...

  4. Jquery 组 tbale表格滚动条

    <!DOCTYPE html><html lang="zh-cn"><head> <meta charset="utf-8&qu ...

  5. Node require

    var user = require("./module_user");//使用模块 module_userconsole.log(user.userCount);user.use ...

  6. vue-cli webpack项目npm run dev启动过程

    前言 通过vue init webpack和npm install命令初始化项目后,执行npm run dev就打开了网站http://localhost:8080.初学者不知道index.html. ...

  7. HTML5 & how to download SVG in js

    HTML5 & how to download SVG in js how to download SVG in js http://dinbror.dk/blog/how-to-downlo ...

  8. 微信小程序开发UI组件

    第一  view和input和button组件 1.UI组件的通用属性 (1)id       唯一标识 (2)class  设置组件的样式类 (3)style 设置组件的内联样式 (4)hidden ...

  9. linux 源的配置更新

    Ubuntu 首先编辑sources.list这个文件 vi /etc/apt/sources.list 把sources.list文件内容替换成如下 deb http://mirrors.aliyu ...

  10. Ajax 響應

    獲取服務器的響應內容,可以使用responseText或者responseXML屬性 responseText:獲取字符串形式的相應內容,除了XML的響應內容以外可用 responseXML:獲取XM ...