HTML5Boilerplate 有一些条件代码用于输出打开的 < HTML > 标签。我正在努力在我的网站上添加 xfbml 和 google plus 共享代码,但不确定将所需代码添加到 < HTML > 标记的位置。
在 Paul Irish 的 github 上,我看到这个评论线程说 facebook 只需要 IE 浏览器的 open < html > 标记中的代码: https ://github.com/paulirish/html5-boilerplate/pull/395 ,所以我可以添加到 html5boilerplate 中的条件 IE 语句。
但是我不确定 google plus 代码。在此页面http://www.google.com/webmasters/+1/button/index.html它告诉我们将其添加到 < HTML > 标记中:
<!-- Update your html tag to include the itemscope and itemtype attributes -->
<html itemscope itemtype="http://schema.org/">
我可以使用一些关于如何在默认情况下包含 <html> 标记的指导,以便我可以将信息附加到它以供社交共享工具使用。
谢谢,斯泰西