简体   繁体   English

您是否始终需要HTML5 Boilerplate或HTML5重置?

[英]Do you always need HTML5 Boilerplate or HTML5 Reset?

Most HTML5 tutorials doesn't mention the need for "resetting" HTML5 for browser compatibility and they basically just teach the new elements like header footer etc... Then there are things like http://html5boilerplate.com/ and http://html5reset.org/ which appears to advocate maximum browser compatibility. 大多数HTML5教程没有提到需要“重置”HTML5以实现浏览器兼容性,它们基本上只是教新的元素,如header footer等......然后有http://html5boilerplate.com/http://等内容。 html5reset.org/似乎提倡最大的浏览器兼容性。

My question is, do we always need any of these if we plan to make HTML5 websites? 我的问题是,如果我们打算制作HTML5网站,我们是否总是需要这些? Is it a prerequisite or are we gonna be just fine without it? 它是先决条件还是没有它我们会好起来的?

I ask because HTML5 boilerplate appears to add a lot of code including several if statements, modernizr, jquery, even Google Analytics, etc., as part of the default package. 我问,因为HTML5样板似乎添加了许多代码,包括几个if语句,modernizr,jquery,甚至Google Analytics等,作为默认包的一部分。

Is it a prerequisite 这是先决条件

No, it isn't. 不,不是。 The Internet police will not come after you if you don't use either one. 如果您不使用任何一个,互联网警察将不会追随您。

But having those is a good idea if you develop sites that would be used in multiple browsers and older ones to boot. 但如果您开发可在多个浏览器中使用的网站和较旧的浏览器,那么拥有这些网站是个好主意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM