- 浏览: 166484 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
crabboy:
goodhttp://veerle.duoh.com/comm ...
表格效果 -
lunvsxiao:
好呀,省的自己记那么多了。。
java常用正则表达式
说明:设置body的padding属性padding-top:16px;padding-bottom:16px,使页面上下留有16px的空白。然后设置#header和#footer的绝对位置和高度。设置#content的overflow:auto。试着改变这几个参数,一用就明白
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <title></title> <meta name="generator" content="editplus"> <meta name="author" content="ariex"> <meta name="keywords" content=""> <meta name="description" content=""> <style type="text/css"> body{margin:0px;padding:0px;overflow:hidden;padding-top:16px;padding-bottom:16px;} div{margin:0px;padding:0px;} #header{background-color:#D3D3D3;color:white;position:absolute;top:0px;left:0px;height:16px;width:100%;} #content{background-color:#EFF7FF;width:100%;height:100%;overflow:auto} #footer{background-color:#FFDD99;color:white;width:100%;height:16px;position:absolute;bottom:0px;left:0px;} </style> <script language="javascript"> </script> </head> <body> <div id="header">header</div> <div id="content"> <script language="javascript"> for(i=0;i<1000;i++){ document.write(i+"<br />"); } </script> </div> <div id="footer">footer</div> </body> </html>
========================================================================
2010-1-15
动态修改头部和底部的属性
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <title>页面全屏布局</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body{margin:0px;padding:0px;overflow:hidden;padding-top:16px;padding-bottom:16px;} div{margin:0px;padding:0px;} #header{background-color:#D3D3D3;color:white;position:absolute;top:0px;left:0px;height:16px;width:100%;} #content{background-color:#EFF7FF;width:100%;height:100%;overflow:auto} #footer{background-color:#FFDD99;color:white;width:100%;height:16px;position:absolute;bottom:0px;left:0px;} </style> <script type="text/javascript"> var bodyObj; var headerObj; var contentObj; var footerObj; function init(){ var innerStr = ""; for(i=0;i<100;i++){ innerStr = innerStr + i+"<br />"; } bodyObj = document.body; headerObj = document.getElementById("header"); contentObj = document.getElementById("content"); footerObj = document.getElementById("footer"); contentObj.innerHTML = innerStr; } function changeHeader(){ bodyObj.style.paddingTop = "80px"; headerObj.style.height = 80+"px"; } function resetHeader(){ bodyObj.style.paddingTop = "16px"; headerObj.style.height = 16+"px"; } function changeFooter(){ bodyObj.style.paddingBottom = "100px"; footerObj.style.height = 100+"px"; } function resetFooter(){ bodyObj.style.paddingBottom = "16px"; footerObj.style.height = 16+"px"; } </script> </head> <body onload="init()"> <div id="header"> <span style="float:right;"> <button onclick="changeHeader()">改变头部</button> <button onclick="resetHeader()">重置头部</button> <button onclick="changeFooter()">改变底部</button> <button onclick="resetFooter()">重置底部</button> </span> header </div> <div id="content"></div> <div id="footer">footer</div> </body> </html>
CSS Top and Bottom Frames Layout.html
符合W3C的商中下布局
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html style="overflow:hidden;_overflow:hidden;" xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Dynamic Drive: CSS Top and Bottom Frames Layout</title> <style type="text/css"> body{ margin: 0; padding: 0; border: 0; overflow: hidden; height: 100%; max-height: 100%; } #framecontentTop, #framecontentBottom{ position: absolute; top: 0; left: 0; width: 100%; height: 130px; /*Height of top frame div*/ overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/ background-color: navy; color: white; } #framecontentBottom{ top: auto; bottom: 0; height: 110px; /*Height of bottom frame div*/ overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/ background-color: navy; color: white; } #maincontent{ position: fixed; top: 130px; /*Set top value to HeightOfTopFrameDiv*/ left: 0; right: 0; bottom: 110px; /*Set bottom value to HeightOfBottomFrameDiv*/ overflow: auto; background: #fff; } .innertube{ margin: 15px; /*Margins for inner DIV inside each DIV (to provide padding)*/ } * html body{ /*IE6 hack*/ padding: 130px 0 110px 0; /*Set value to (HeightOfTopFrameDiv 0 HeightOfBottomFrameDiv 0)*/ } * html #maincontent{ /*IE6 hack*/ height: 100%; width: 100%; } </style> <script type="text/javascript"> /*** Temporary text filler function. Remove when deploying template. ***/ var gibberish=["This is just some filler text", "Welcome to Dynamic Drive CSS Library", "Demo content nothing to read here"] function filltext(words){ for (var i=0; i<words; i++) document.write(gibberish[Math.floor(Math.random()*3)]+" ") } </script> </head> <body> <div id="framecontentTop"> <div class="innertube"> <h1>CSS Top and Bottom Frames Layout</h1> <h3>Sample text here</h3> </div> </div> <div id="framecontentBottom"> <div class="innertube"> <h3>Sample text here</h3> </div> </div> <div id="maincontent"> <div class="innertube"> <h1>Dynamic Drive CSS Library</h1> <p><script type="text/javascript">filltext(255)</script></p> <p style="text-align: center">Credits: <a href="http://www.dynamicdrive.com/style/">Dynamic Drive CSS Library</a></p> </div> </div> </body> </html>
- CSS_Top_and_Bottom_Frames_Layout.rar (1.1 KB)
- 下载次数: 15
发表评论
-
img 图片显示多余空白解决方法
2014-09-03 23:01 0img 图片显示多余空白解决方法:在进行DIV+CSS排版时 ... -
js event.keyCode
2011-12-02 17:13 673keycode 8 = BackSpace BackSpace ... -
js event.keyCode
2011-12-02 17:06 2keycode 8 = BackSpace BackSpace ... -
IE6下png透明处理心得
2011-11-24 12:41 1261首先说明一下,网上处理IE6下png透明的方法有很多,但无外乎 ... -
我的笔记
2011-10-25 22:52 0http://www.ccxcn.com/blog/post/ ... -
HTTP状态码(HTTP Status Code)
2011-02-23 09:40 6831xx(临时响应)表示临时响应并需要请求者继续执行操作的状态代 ... -
上传图片预览-兼容IE6,IE7,IE8,FF
2011-01-20 14:07 689<!DOCTYPE html PUBLIC " ... -
动态加载javascript文件
2010-12-23 23:53 686动态加载javascript?很俗的一个题目,如果你已经知道如 ... -
Apache相关配置
2010-11-30 22:15 705强制IE缓存CSS中定义的图片 document.execC ... -
表格效果
2010-07-14 18:07 754web应用中的表格效果。 鼠标滑动时选中横行和竖列。 见附 ... -
所有浏览器中都能正常显示的字体
2010-07-04 01:31 930很佩服国外一些前端开发人员对待学问的研究精神,他们很善于总结发 ... -
隐藏IE窗口自带的“Windows Internet Explorer”
2010-05-17 10:34 1679var whiteStr = ""; f ... -
当加载flash或者弹出窗口时,Internet Explorer显示安全提示
2010-05-05 11:50 1887当我们在开发web前端时,有时加载的swf文件或者某些js文件 ... -
子页面和父页面的相互调用
2010-04-07 13:53 2428父页面 <!DOCTYPE html PUBLI ... -
CSS选择器笔记
2010-03-20 11:17 1381http://www.456bereastreet.com/a ... -
美化表单
2010-01-14 22:42 1256首先介绍一个设计很不错的网站:http://utombox.c ... -
你是如何让position:fixed在IE6中工作的
2010-01-09 17:20 2254你是如何让position:fixed在IE6中工作的? 本 ... -
动态加载css的实现思路
2010-01-04 15:50 1420动态加载css的实现思路,目前想到有两种: 一、js 主要 ... -
滚动列表
2010-01-04 13:13 1081<MARQUEE onmouseover=this.st ... -
淡入淡出DIV层效果
2009-12-29 18:09 2062<html> <head> &l ...
相关推荐
html页面头部,底部固定,中间内容超过1屏时,页面自动显示滚动条
html页面头部和底部解决苹果手机无法固定。
基于html+css+js进行网页设计 课程设计 毕业设计 供参考 源码+说明 基于html+css+js进行网页设计 课程设计 毕业设计 供参考 源码+说明 基于html+css+js进行网页设计 课程设计 毕业设计 供参考 源码+说明 ...
jQuery-Posfixed 能够让网页的导航或表头等固定在顶部或底部,让用户更方便的操作或查看信息,淘宝网、易迅网等电子商务网站常常用到这种效果。除了导航和表头,也可以固定 其他内容,比如广告、返回顶部等等,同时 ...
那么如何将Web页面的“footer”部分永远固定在页面的底部呢?先来看下下面的代码吧 这是第一种方案,后面还有几种 HTML代码 复制代码代码如下: ”container”> ”header”>这是头部</div> ”page> ”left”>left ...
在做单页面应用程序时,一般页面布局头尾两块都是固定在布局页面,中间为是路由入口。这篇文章主要介绍了vue-router 通过路由来实现切换头部标题 ,需要的朋友可以参考下
主要介绍了微信小程序实现组件顶端固定或底端固定效果(不随滚动而滚动),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
基于Ajax框架时间的页面排序技术,拖动鼠标让您方便调整页面栏目顺序,您还可以修改每个页面的模板,定义页面的Seo等,而且能让您页面采用不同的页面头部和底部模板,轻松实现页面多样化。 3、图片和资源文件管理...
基于Ajax框架时间的页面排序技术,拖动鼠标让您方便调整页面栏目顺序,您还可以修改每个页面的模板,定义页面的Seo等,而且能让您页面采用不同的页面头部和底部模板,轻松实现页面多样化。 3、图片和资源文件管理...
8.6.1 IE6.0 中固定宽度和高度的容器和内容 8.6.2 FIREFOX2.0 中的容器与内容 8.6.3 可能出现的问题和解决方法 8.7 使用:after 伪类解决浮动的问题 8.7.1 IE6.0 中的浮动元素和容器 8.7.2 FIREFOX2.0 中的浮动元素和...
基于Ajax框架时间的页面排序技术,拖动鼠标让您方便调整页面栏目顺序,您还可以修改每个页面的模板,定义页面的Seo等,而且能让您页面采用不同的页面头部和底部模板,轻松实现页面多样化。 3、图片和资源文件管理 ...
基于Ajax框架时间的页面排序技术,拖动鼠标让您方便调整页面栏目顺序,您还可以修改每个页面的模板,定义页面的Seo等,而且能让您页面采用不同的页面头部和底部模板,轻松实现页面多样化。 3、图片和资源文件管理 ...
基于Ajax框架时间的页面排序技术,拖动鼠标让您方便调整页面栏目顺序,您还可以修改每个页面的模板,定义页面的Seo等,而且能让您页面采用不同的页面头部和底部模板,轻松实现页面多样化。 3、图片和资源文件管理 ...
通常用于一些有固定格式的网站 比如一些网站的头部和底部都是一样的 此时即可使用默认模板 默认模板 在项目的根目录下创建一个名为app.html的文件 Nuxt即可自动将其识别为默认模板: 用法和字符串拼接有点类似 可...
固定头部和尾部,中间部分可滑动,使用flex布局 1.设置html,body高度为100% 2.设置最外层div的布局方式为弹性布局display:flex; 3.设置最外层div的主轴方向为flex-direction: column;主轴为垂直方向,起点在上沿 ...
导航条设置:可以设置导航条是否固定,还是随页面文档流滚动,可以设置是白色底还是黑色底,是固定在顶部还是固定在底部等。评论框设置:设置评论框基本配色方案,以及一些描述文字。侧边栏设置:在这里可以设置首页...
h5做成的移动端页面,常见布局为头部+躯干+底部三栏模式,头部和顶部都是固定定位,躯干可里的内容可以滚动,暂定的布局如下: <header></header> <main></main> <footer></footer> 但如果没采用IphoneX机型...
我们常见的网站页面都会把一个页面分为:头部区、内容区、页脚区,当头部区和内容区内容较少时,页脚区能固定在网页底部,而不是随着文档流排布。当页面内容较多时,页脚能随着文档内容自动撑开,显示在页面的最底部。这...