fujian - 2008-9-3 14:21:19
I have to agree with Niall Doherty, * {margin: 0px; padding: 0px;}
basically means "traverse every css element and give it these
attributes". That is a very unnecessary strain on the server and
a bad semantic practice, as you have to give some elements
padding/margin again, after stripping them.
翻译为:我要同意尼尔多尔蒂,* {margin: 0px; padding: 0px;}
基本上是指“遍历每一个CSS的元素,并给它这些属性” 。
这是一个非常不必要的应变对服务器和一个坏的语义实践,正如你所给予的一些内容再次
padding/margin ,之后剥夺他们。
Here is what's in Reset. As you can see in the code below, or in this example showing [url=http://developer.yahoo.com/yui/examples/reset/reset-simple_source.html][color=#0000ff]HTML elements after Reset has been applied[/color][/url], it standardizes cross-browser rendering on common elements, neutralizing browsers' built-in stylesheets.
翻译为:这里是什么的,在重置。你可以看到在下面的代码,
或在这个例子中显示的HTML元素后,重置已应用,
它规范了跨浏览器的渲染上的共同要素,中和浏览器'内置在样式表。
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:normal;
}
q:before,q:after {
content:'';
}
abbr,acronym { border:0;
}
由于原文内容较多而且基本都是英文所以我就把最重要的拿来了(现弄到这吧 ,工作了~!!0903~)
fujian - 2008-9-3 14:29:33
以前写样式前都加这句 *{};
上班后有更多的时间去注意这些细节,之前没找到;
现在算是明白了那些流行的门户什么的都用第二种的原因;
163的
/* CSS Document 2008.7 */
body { text-align: center; font-family:"宋体", arial;margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0; }
li{list-style-type:none;}
img{vertical-align:top;}
h1,h2,h3,h4,h5,h6 { margin:0; padding:0;font-size:12px; font-weight:normal;}
hufangyuan - 2008-9-3 20:20:39
谢谢,学习了!
欢迎大家回来,把自己在外面的学到新东西,发表一下!
偶现在专门搞程序了,哎!
进步很少咯