Html5Boilerplate 或 Html5Boilerplate Mobile 适合移动优先网站?

发布于 2024-12-01 03:08:19 字数 358 浏览 1 评论 0 原文

现在 Html5Boilerplate 已达到版本 2.0 并且面向移动优先设计,应该 Html5Boilerplate Mobile 仍可用于移动优先网站吗?只是想问 b/f 我深入研究了每个代码。

看起来明显的区别之一是 Html5Boilerplate 已从 CSS 重置切换为规范化,并添加了移动优先方面,如 respond.js 和移动媒体查询部分。标准样板在 Github 上也显得更加活跃。大家对这两个人有什么看法吗?

Now that Html5Boilerplate has reached version 2.0 and is oriented around mobile-first design, should Html5Boilerplate Mobile still be used for mobile-first sites? Just wanted to ask b/f I dig through the code of each.

It appears one of the obvious differences is that Html5Boilerplate has switched from CSS reset to normalize, and added mobile-first aspects like respond.js and mobile media query sections. Standard boilerplate appears more active on Github as well. Anyone have any opinion about these two?

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

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

发布评论

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

评论(3

习惯成性 2024-12-08 03:08:19

这个答案主要来自我们关于该主题的邮件列表线程< /a>...

如果您刚开始使用,则应该使用 HTML5Boilerplate
在网站上。它经过优化,可以在移动浏览器上工作和适应。

移动 HTML5 Boilerplate 针对明确的 Web 应用程序进行了优化
编写为在桌面以外的设备上具有不同的用户体验。

  • 这意味着他们可能想要模仿本机应用程序的 UI
    或者接近它。
  • 他们可能会大量使用基于触摸的 UI 范例和其他
    在桌面浏览器上无法实现的交互。
  • 他们明确使用媒体查询和其他方式来检测
    非桌面浏览器并提供不同的体验。

当我说网络应用程序时,我指的是那些被广泛使用的网站
完成某些任务(例如 twitter.com / gmail.com / facebook.com
/ wordpress.com 的管理界面)。这些网站需要采取
利用可用空间并帮助用户完成任务
无论使用什么设备,都可以轻松完成。

另一方面,我们确实有用户偶尔访问的网站
因为他们在一些朋友的电子邮件或 Reddit 上发现了它
内容,但用户很少与其交互(除了访问它)
或者最多留下评论),在这种情况下 html5 样板会
是一个很好用的模板。对于大多数网站来说这将是一个不错的选择
内容丰富且需要最少的用户交互。

对我们来说不幸的是,移动平台也通过以下方式创建了孤岛:
指定用于优化其平台的自定义元标记。
例如 Apple 建议使用 apple-touch-icon 元标记来指定
webkit 移动浏览器特有的东西。诺基亚也有自己的。我们做到了
不希望 html5boilerplate 添加这样的缺陷到默认值,但是这个
对于编写专门为采取行动而设计的应用程序的人来说,这是必要的
非桌面设备的优势。已经有很多了
一致性,但我们希望移动设备有更多的标准化
优化。

我们计划使用较新的文件更新移动版本
同样,但今天使用它并没有明显的缺点。我们还没有一个可以只开展一个项目的交汇点,但我们希望将来能做到这一点
合而为一:)

Stealing this answer mostly from our mailing list thread on the subject...

HTML5Boilerplate is the one you should use if you are getting started
on websites. It is optimized to work and adapt on mobile browsers.

Mobile HTML5 Boilerplate is optimized for web apps that are explicitly
written to have different UX while on devices other than the desktop.

  • This means they might want to imitate the UI of native applications
    or be close to it.
  • They may make heavy use of touch-based UI paradigms and other
    interactions that are not possible on a desktop browser.
  • They explictly use media queries and other ways to detect a
    non-desktop browser and serve an experience that is different.

When I say web apps, I mean websites that are used intensively to
accomplish certain tasks (like twitter.com / gmail.com / facebook.com
/ admin interface of wordpress.com ). These sites are required to take
advantage of the space available and help users accomplish their tasks
with minimal effort no matter what device.

On the other hand, we do have websites that users visit occasionally
because they found it on some friend's email or on reddit which has
content but users rarely interact with it (other than just visiting it
or at most leaving a comment), in which case html5 boilerplate would
be a good template to use. This would be a good option for most sites
that are content-rich and require minimal user interaction.

Unfortunately for us, mobile platforms are also creating silos by
specifying custom meta tags to use to optimize for their platform.
E.g. Apple recommends using apple-touch-icon meta tag to specify
things specific to webkit mobile browsers. Nokia has its own. We did
not want html5boilerplate to add such cruft to the defaults, but this
would be necessary for someone writing an application tailored to take
advantage of non-desktop devices. There is already a lot of
consistency, but we wish there was more standardization of mobile
optimizations.

We are planning an update to the mobile version with the newer files
as well, but there is no significant disadvantage to using it today. We do not yet have a meeting point where we could just have one project, but we are hoping in the future it does
merge into one :)

亽野灬性zι浪 2024-12-08 03:08:19

不,Html5Boilerplate Mobile 不应该用于新项目;它已被弃用。

弃用通知已于 2015 年 7 月添加到项目的 GitHub 存储库(截至本回答 - 2016 年 8 月 - 这是最新的提交):

H5BP 团队决定不再维护 Mobile Boilerplate,因为
HTML5 Boilerplate 似乎是任何类型的良好起点
项目。

No, Html5Boilerplate Mobile should not be used for new projects; it is deprecated.

A deprecation notice was added in July 2015 to the project's GitHub repo (as of this answering -- Aug 2016 -- that was the most recent commit):

The H5BP team decided to no longer maintain Mobile Boilerplate since
HTML5 Boilerplate seems to be a good starting point for any kind of
project.

辞旧 2024-12-08 03:08:19

这取决于方法。如果您要为移动和桌面网站使用相同的标记,请使用 HTML5 BP。但如果您要为移动设备制作单独的网站,请选择 Mobile Boiler Plate

It depends on approach. Use HTML5 BP if you are going to have same mark-up for you mobile and desktop website. but if you are making separate website for mobile then go for Mobile Boiler Plate

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