如何正确地将 HTML5 Boilerplate 与 Twitter Bootstrap 集成?

发布于 2024-12-25 11:16:38 字数 964 浏览 2 评论 0原文

在我的 Play 2.0 项目中,我已经集成了 Bootstrap(因为文件较少,Play 可以即时编译它们),但现在我找到了 Boilerplate,我认为使用它也是一个好主意。

经过一番谷歌搜索后我发现了这个: http://www .quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa

所以,看起来集成应该是可能的,并且有甚至有两个项目试图做到这一点。唯一的问题是他们做完全不同的事情,我不确定哪一个是正确的。

当前状态下的 https://gist.github.com/1422879 似乎只是忽略 样式来自 Boilerplate 的 .css 文件。它已重命名为 h5bp.css,但我没有看到 h5bp.css 包含在任何地方。

https://github.com/elgreg/html5-boilerstrap 另一方面使用它们,只需将 styles.css 文件分成两部分(h5bp_normalize.cssstyles.cssbootstrap.css 包含在它们之间)。但是这样Boilerplate和Bootstrap之间不会有冲突吗?

所以我有点失落。在这种情况下,正确的做法是什么?

In my Play 2.0 project I already have Bootstrap integrated (as the less files, Play can compile them in the fly) but now I found Boilerplate and I think it would be a nice idea to make use of it also.

After a bit of googling I found this:
http://www.quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa

So, looks like integration should be possible, and there are even 2 projects which try to do that. The only problem is that they do completely different things and I'm not sure which one is correct.

https://gist.github.com/1422879 in its current state seems to just ignore styles.css file coming from Boilerplate. It's renamed to h5bp.css, but I don't see h5bp.css included anywhere.

https://github.com/elgreg/html5-boilerstrap on the other hand uses both of them, just splitting styles.css file into two parts (h5bp_normalize.css and styles.css, bootstrap.css is included between them). But aren't there any conflicts between Boilerplate and Bootstrap this way?

So I'm a bit lost. What is the proper way of doing things in this case?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

云归处 2025-01-01 11:16:38

只需使用Initializr,它是半官方的解决方案,它也有大量的选项。开箱即用支持 Bootstrap + H5BP!

http://www.initializr.com/

Just use Initializr, it's the semi-official solution and it has a huge set of options too. Bootstrap + H5BP is supported out of box!

http://www.initializr.com/

分开我的手 2025-01-01 11:16:38

我已经从 twitter bootstrap 中删除了重置样式(通过删除 less @import 语句)并将其粘贴到 html5-boilerplate(在用户样式部分)中。工作得很好。

I've removed reset styles from twitter bootstrap(by removing less @import statement) and pasted it into html5-boilerplate(in user styles section). Worked fine.

執念 2025-01-01 11:16:38
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文