我想在页面上添加"google + 1"按钮,但我想使用自定义大小的自定义图像,最好不使用javascript,这与Facebook和Twitter很可能有关.我不在乎它现在是否显示计数.
Aav*_*iya 82
最后!找到了解决这个问题的好方法.如此简单和工作:)希望它可以帮助你!
<a href="https://plus.google.com/share?url=ADD_YOUR_URL" >
<img src="path_to_your_image" alt="Google+" title="Google+"/>
</a>
Run Code Online (Sandbox Code Playgroud)
资料来源:http://notesofgenius.com/how-develop-custom-google-plus-button/
Ghi*_*igo 13
这是谷歌开发者页面的官方示例:
还要考虑URL已更新.
<a href="https://plus.google.com/share?url={URL}" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
<img src="https://www.gstatic.com/images/icons/gplus-64.png" alt="Share on Google+"/>
</a>
Run Code Online (Sandbox Code Playgroud)
使用不透明度0只是让它不可见.然后使用背景使它看起来像你想要的.
<style>
.my_custom_googleplusone{
overflow: hidden;
background: url(blahblah.png);
}
.my_custom_googleplusone:hover{
background: url(blahblah2.png);
}
</style>
<div class="my_custom_googleplusone">
/// GOOGLE BUTTON WITH OPACITY OF 0 (and z-index 1 with absolute position);
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
54641 次 |
| 最近记录: |