你使用哪个HTML5重置CSS?为什么? [英] Which HTML5 reset CSS do you use and why?

查看:106
本文介绍了你使用哪个HTML5重置CSS?为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您使用哪个HTML5重置CSS,为什么?是否有您发现要覆盖更多病例?



我开始使用HTML5 Doctor's: http://html5doctor.com/html-5-reset-stylesheet/ 它似乎工作,但我想知道是否有更好的东西


解决方案

实际谈话:尽管降价 kaikai 是对的,你只需要重置* padding& margin to 0。



虽然不幸的是,我们99%的人没有资源或人力跟上数百个浏览器版本。



html5reset:(太麻烦了)



我刚看了一下 http://html5reset.org/

  img,
object,
embed {max-width:100%;}

和:

  html {overflow-y:scroll;} 

我理解它有很好的意图,但这不是复位表的工作。



<$>

p $ p> body {
line-height:1.5;
background:white;
}

Normalize.css:(不正常)



https://github.com/necolas/normalize .css / blob / master / normalize.css



它开始与一些webkit /即hacks,但

  h1 {
font-size:2em;
margin:0.67em 0;
}

h2 {
font-size:1.5em;
margin:0.83em 0;
}

h3 {
font-size:1.17em;
margin:1em 0;
}

h4 {
font-size:1em;
margin:1.33em 0;
}

h5 {
font-size:0.83em;
margin:1.67em 0;
}

h6 {
font-size:0.75em;
margin:2.33em 0;
}

每个标头标签都是定位的。 &他们不会重置身体的行高。



我确定以上所有的工作都很好,但可能会被覆盖超过必要。



Eric Meyer



YUI >

HTML5Boilerplate



以上是对于Boilerplate倾向于我相信由于人气。目前,我的自定义重置的80%是样板。



我要去一遍一遍地做自己的,这不是火箭科学。 / p>

Which HTML5 reset CSS do you use and why? Is there one that you've found to cover more cases?

I've started using HTML5 Doctor's: http://html5doctor.com/html-5-reset-stylesheet/ It seems to work, but I'm wondering if there is something better out there.

解决方案

Real talk: Despite the markdowns kaikai is right, you only need to reset *padding & margin to 0.

Though unfortunately 99% of us do not have resources or man power to keep up with the hundreds of browser versions out there. So a reset sheet is essential for the typical website.

html5reset: (It's too interfering)

I just took a look at http://html5reset.org/

img,
object,
embed {max-width: 100%;}

And:

html {overflow-y: scroll;}

I understand it has good intentions but, that's not the job of a reset sheet. It's making too many assumptions.

BluePrint Reset:(literally a blueprint)

body {
  line-height: 1.5;
  background: white;
}

Whats up with 1.5. And why background white?(I know it's for correcting but still not necessary)

Normalize.css: (Not normal)

https://github.com/necolas/normalize.css/blob/master/normalize.css

It started good with some webkit/ie hacks but

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

h2 {
    font-size: 1.5em;
    margin: 0.83em 0;
}

h3 {
    font-size: 1.17em;
    margin: 1em 0;
}

h4 {
    font-size: 1em;
    margin: 1.33em 0;
}

h5 {
    font-size: 0.83em;
    margin: 1.67em 0;
}

h6 {
    font-size: 0.75em;
    margin: 2.33em 0;
}

Every header tag is targeted. & they don't reset the line-height of the body.

I'm sure all the above does the intended job well, but will probably be overridden more than necessary.

Eric Meyer

YUI

HTML5Boilerplate

The above are more for pros with Boilerplate leaning to the (over friendly) side I'm sure due to popularity. At the moment 80% of my customized reset is boilerplate.

I'm going to go though all three bit by bit and make my own, it's not rocket science.

这篇关于你使用哪个HTML5重置CSS?为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆