自定义添加此按钮图标图形

Customizing AddThis Button Icon Graphic

本文关键字:图标 图形 按钮 添加 自定义      更新时间:2023-09-26

我有一堆AddThis共享按钮,它们会在有人订阅我的电子邮件列表后显示。

我想为GooglePlus添加一个共享按钮,但它不起作用。

例如,为了放置我自己的LinkedIn按钮,我使用了以下内容,它就像一个魅力:

<a class="addthis_button_linkedin"><img src="img/linkedin.png" width="64" height="64" alt="Share to LinkedIn"></a>

然而,当我为自定义Google+按钮做同样的操作时,会出现两个按钮。这是我的标记:

<a class="addthis_button_google_plusone"><img src="img/googleplus.png" width="64" height="64" alt="Share to Google+"></a>

以前有人遇到过这个问题吗?

如果API不支持它,是否有解决方法?

我可以使用CSS移动其他图标来覆盖Google+的小图标,但它看起来很草率。

您可能想要使用addthis_button_google_plusone_share按钮。

以下是我如何使用PHP和HTML:滚动自己的共享按钮

    <div class="sharing_buttons">
        <a class="google_plusone sharing" href="https://plus.google.com/share?url=http://YOUR_URL" target="_blank" title="Share on Google+"></a>
        <a class="facebook sharing" href="http://www.facebook.com/sharer.php?u=http://YOUR_URL" target="_blank"title="Share on Facebook"></a>
        <a class="twitter sharing" href="http://twitter.com/home?status=YOUR TWEET GOES HERE" target="_blank" title="Share on Twitter"></a>
        <a class="linkedin sharing" href="http://www.linkedin.com/shareArticle?mini=true&url=
        <?php echo urlencode('YOUR_URL'); ?>
        &title=<?php echo urlencode('YOUR TITLE HERE'); ?>
        &summary=<?php echo urlencode('WRITE A SUMMARY HERE (SPACES WILL BE ENCODED)'); ?>
        &source=<?php echo urlencode('@4click'); ?>" target="_blank" title="Share on LinkedIn"></a>
        <a class="button_email sharing" href="mailto:?subject=YOUR SUBJECT&body=BODY OF THE EMAIL" target="_blank" title="Share via e-mail"></a>
    </div>

图标图形是使用CSS添加的。例如:

.google_plusone { background:url(../img/sharing_sprite.png) 0px 0px; }

这个解决方案的局限性在于,你没有AddThis提供的跟踪功能,但我使用HootSuite跟踪我的社交分享,所以这对我来说没什么大不了的。