自定义添加此按钮图标图形
Customizing AddThis Button Icon Graphic
我有一堆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跟踪我的社交分享,所以这对我来说没什么大不了的。
相关文章:
- Javascript更改图标
- 有没有一个javascript图形绘制库可以进行气球树布局
- 单击更改图标并通过javascript添加一个css类
- 我希望只有在我滚动页面后才能显示我的返回页首图标
- 如何更改角度谷歌地图上的集群图标
- 如何在d3上的图形中添加放大和缩小按钮
- 如何在React Native中绘制图形
- simpleweather js天气图标
- 更改图层中单个矢量特征的图标
- 使用Angular单击时更改特定图示符图标的颜色
- 加载图像时加载图标
- 可以'点击汉堡包图标后,菜单无法正常打开
- 持久页面操作图标
- 点击图标是't在量角器上工作
- 通过单击同一图标使菜单出现和消失
- 删除图形和数字之间的连字符(-)符号
- 在for循环中使用多维数组设置google.maps.Marker图标
- 在arcgis javascript中手动添加图形层的图例
- 替换与单词'匹配的文本字符;购物车'替换为img图标
- 自定义添加此按钮图标图形