2007年07月30日 PM 31:54 | 作者:愆伏
分类:互联网产品设计 | 评论(1)
2007年07月13日 PM 51:10 | 作者:愆伏
原文:A CSS sticky footer
作者:Ryan Fait
我E文不好,不过代码看的懂
该文实现粘性居底的核心方法,就是负margin
先用一个容器wrapper包住除footer以外的内容
将wrapper的高度设置为100%,再用负的margin空出footer高度
如此实际wrapper的高度应等于100%-footer.height
效果达成
作者在HTML中加了一个和footer一样高度的push容器
没理解什么意思,可能是用来hack的。谁知道的话,我们探讨一下
把代码贴上
HTML:
- <html>
- <head>
- <link rel="stylesheet" href="layout.css" ... />
- </head>
- <body>
- <div class="wrapper">
- <p>Your website content here.</p>
- <div class="push"></div>
- </div>
- <div class="footer">
- <p>Copyright (c) 2008</p>
- </div>
- </body>
- </html>
CSS:
- * {
- margin: 0;
- }
- html, body {
- height: 100%;
- }
- .wrapper {
- min-height: 100%;
- height: auto !important;
- height: 100%;margin: 0 auto -4em; /* the bottom margin is the negative value of the footer's height */
- }
- .footer, .push {
- height: 4em; /* .push must be the same height as .footer */
- }
分类:互联网产品设计 | 评论(1)
2007年07月12日 PM 13:20 | 作者:愆伏
上周景路说他写了一篇关于镇江的文章上了my0511首页,着我去看一下。
我离开镇江也有6年多,总还是想着它的好:
小——小到走路可以逛完整个市区。
惬意——朝九晚五,吃完晚饭可以去长江路散步,去城市客厅小憩。
房价便宜——只有南京的一半不到
交通便利——京沪铁路,宁沪高速
美食众多——锅盖面、小笼包、鸭血粉丝、肴肉
人杰——萧统、沈括
地灵——金山、焦山、南山
有人说镇江太落后,好单位少,工资低。
这没错,可恰恰正因为如此,才有镇江现在休闲的氛围。
试想一下,镇江企业多起来了、房价涨了、高楼盖起来了,现在的好生活还会长久吗?
镇江这么好,我干吗不回去?
查看全文 »
分类:工作与生活 | 评论(2)