摘要: 2010年05月13日 14:42借用腾讯空间页面底部的效果图:默认文档声明为xhtml1.0过渡型。<title>页面底部</title><style type="text/css">*{margin:0;padding:0;}body{width:950px;margin:0 auto;font:12px/1.5 "宋体",Arial;}#footer{wi... 阅读全文
posted @ 2010-12-03 13:55 xmlovecss 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 2010年05月22日 14:09css reset是去除各种浏览器对元素默认表现不一致的手段。那么我们常用的对列表的设置list-style:none;会有什么问题呢?如果是在ie6和ie7中,ul设置了浮动,加上margin属性,为了避免ie6双边距bug,设置display:inline;那么项目符号虽然是不在了,但是他们的位置还在。最好的重置为:list-style:none outsid... 阅读全文
posted @ 2010-12-03 13:53 xmlovecss 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 2010年06月01日 10:501.未清除的margin和padding引发的布局错位;2.ie6,7,8下的浮动空白错位,解决办法是给li添加行高属性;代码如下:<style type="text/css">* {margin:0;padding:0;}body { font-size:12px; }ul {float:left;width:690px;border:1px sol... 阅读全文
posted @ 2010-12-03 13:52 xmlovecss 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 2010年06月15日 17:23二话不说,先上代码:<!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"&... 阅读全文
posted @ 2010-12-03 13:51 xmlovecss 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 2010年07月16日 18:32问题描述:body中设置的字体“宋体”在ie6中影响了文字行高的显示位置会偏上,而在其它浏览器中并不存在这种现象。代码如下: <style type="text/css">body,p { margin:0; padding:0;}body { font:12px/1.5 "宋体", Arial, Helvetica, sans... 阅读全文
posted @ 2010-12-03 13:50 xmlovecss 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 2010年07月18日 12:50<!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"><hea... 阅读全文
posted @ 2010-12-03 13:49 xmlovecss 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 2010年07月23日 09:23<title>无标题文档</title><style type="text/css">* { margin:0; padding:0;}a { display:block; width:100%; white-space:nowrap;}li { padding-left:30px; line-height:30px; font... 阅读全文
posted @ 2010-12-03 13:48 xmlovecss 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 其实用负边距布局最大的优点就是布局不受html结构的影响,可以任意调换预备放在同一行的块的位置。这对于我们想要把最重要的内容最先呈现在用户面前有着很大的作用和益处。那么如何计算负边距呢?先看下面的代码。html:1 <body>2 <div class="wrap">3 <div class="content">a</div>4 <div class="nav">b</div>5 <div class="infor">c</d 阅读全文
posted @ 2010-12-03 13:37 xmlovecss 阅读(685) 评论(0) 推荐(0) 编辑
摘要: 在我们写样式的时候,页面的CSS在经历几个版本的修改之后,可能有些样式已经用不到了,或许将某些样式更名了而原来的忘了删除,总之页面中可能存 在着一些无用的样式。这些无用的浪费了一些服务器空间和带宽消耗,也会增大我们的维护成本。那么有没有一些办法来清理那些无用的样式呢?今天就让我们来了 解一下几个比较有用的工具。Dust-Me selectorsDust-Me是一个很有用也很好用的Firefox插件,它可以分析到你的页面中调用的所有CSS文件并分析那些在页面中没有被用到。支持本地和远程样式文件,包括使用<link>标签、<?xml-stylesheet?>处理指令、@im 阅读全文
posted @ 2010-12-03 13:26 xmlovecss 阅读(2272) 评论(0) 推荐(0) 编辑
摘要: 题目描述:当内容不满一屏时,底部内容始终位于显示屏的底部;当内容超过一屏时,则位于内容底部。示例代码:<!DOCTYPE HTML><html><head><meta charset="utf-8"><title>footer始终居于底部</title><style type="text/css">* { margin:0; padding:0; }body { font:12px/1.5 arial; }html, body, .wrap { height:100%; 阅读全文
posted @ 2010-12-03 13:14 xmlovecss 阅读(995) 评论(0) 推荐(0) 编辑