最好的css重写代码
Eric Meyer’s CSS Reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
相关文档:
◆ 网页平面多媒体培训、认证考试免费咨询热线:400-700-5807 进入网络咨询平台 ◆
用CSS改变表格边框样式,很实用的一种方法。
制作方法:
将下面的代码复制到<body>~</body>里,此为隐藏下边框
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; bo ......
四个css工具:fonts,grids,reset,base
使元素标准化的reset.css
以下普通而常用的元素都将margin和padding值标准化到0
the document body
div and p
所有list 元素:dl,dt,dd,ul,ol,li
标题级元素:h1,h2,h3,h4,h5,h6
pre和blockquote元素
某些表单元素:form,fieldset,input,textarea
table元素:t ......
不可换行 <NOBR></NOBR> (不换行)
overflow
版本:CSS2 兼容性:IE4+ NS6+ 继承性:无
语法:
overflow : visible | auto | hidden | scroll
参数:
visible : 不剪切内容也不添加滚动条。假如显式声明此默认值,对象将被剪切为包含对
象的window或f ......
IE vs FF
CSS 兼容要点:DOCTYPE 影响 CSS 处理
FF: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行
FF: body 设置 text-align 时, div 需要设置 margin: auto(主要是 margin-left,margin-right) 方可居中
FF: 设置 padding 后, div 会增加 height 和 width, 但 IE 不会, 故需要用 !important 多设一 ......
页面上的css链接 如下
<link href="../style/style.css" rel="stylesheet" type="text/css" />
当a.action通过重定向redirect 到另一个b.action后,进入下一个jsp页面,此时css和页面的图片都失效。
后来把jsp里面的css路径、图片路径改为绝对路径,就把问题结局了。
<link href="/BookShop/style/style.css" ......