【问题标题】:How to open the link in new window of Google Plus Badge?如何在 Google Plus 徽章的新窗口中打开链接?
【发布时间】:2012-07-20 01:38:52
【问题描述】:

我的网站上有Google Plus BadgeGoogle +1 Button 的代码
我需要在新窗口中打开指向 Google+ 页面(由 Badge 生成)的链接。

如果你有其他方法,我需要:

  • 链接到 Google+ 信息页。
  • 添加添加到圈子的功能。
  • +1 带有计数的按钮。

全部排成一行。

我的代码如下:

<table>
<tr>
<td style="padding-top:2px; vertical-align:top;"><div style="width:180px; height:30px;     overflow:hidden;">
<div style="margin-top:-15px; margin-left:0px;" title="International Studies Google         Plus">
                <style type="text/css">
                             #___plusone_0, #___plusone_0         iframe{
                                 width:66px !important;
                             }
                            </style>
                <div class="g-plus" data-href="https://plus.google.com/118182458881247471225?rel=publisher" data-width="170" data-height="69" data-theme="light"></div>
              </div>
            </div></td>
              <td style="padding-top:6px; padding-left:5px;"><g:plusone></g:plusone>    </td>
</tr>
</table>

【问题讨论】:

    标签: google-plus google-plus-one


    【解决方案1】:

    你不能这样做。

    徽章不提供任何允许您在新窗口中打开链接的标志。它也是提供您需要的“添加到圈子”功能的唯一功能。

    最接近的方法是使用静态徽章和 +1 按钮:

    <div>
      <a href="https://plus.google.com/118182458881247471225?prsrc=3" rel="publisher" style="text-decoration:none;" target="_blank">
      <img src="//ssl.gstatic.com/images/icons/gplus-32.png" alt="Google+" style="border:0;width:32px;height:32px;"/></a>
    
      <div class="g-plusone" data-annotation="inline" data-width="300"></div>
    </div>
    

    此外,这个功能似乎有一个feature request。如果您对此功能请求加注星标,您将收到有关更新的通知。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-01
      • 2015-02-09
      • 2011-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多