随笔分类 -  CSS

一段始终保持在最底部的div css代码
摘要:.footer{ background: #eee; text-align: center; bottom:0px; position:fixed; height: 30px; line-height: 30px; width: 100%; _position: absolute; /*兼容IE6*/ _top: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight); /*兼容IE6*/} 阅读全文

posted @ 2012-08-16 14:51 star-star 阅读(304) 评论(0) 推荐(0)

一段无解的CSS,不知道原因!
摘要:首先定义一个外围的div,设置其背景颜色为green,然后再里面定义一个div,这个div设置上外边距为20像素 代码类似于这样 <style type="text/css"> body{color:#fff;} .pagecontent2 { background: red; } </style> <div class="pagecontent2" id="parentdiv"> <div style="margin-top: 20px;" id="childd 阅读全文

posted @ 2012-08-15 11:32 star-star 阅读(485) 评论(9) 推荐(0)

ie6,line-height 当包含图片之后不垂直居中的解决办法
摘要:ie6,line-height 当包含图片之后不垂直居中的解决办法 阅读全文

posted @ 2012-08-14 11:09 star-star 阅读(794) 评论(0) 推荐(0)

导航