Use custom image for Google+1 button?

前端 未结 9 2184
粉色の甜心
粉色の甜心 2020-12-04 16:28

I want to include a \"google+1\" button on a page, yet I want to use a custom image with a custom size for it and preferably without javascript, much like is possible to do

相关标签:
9条回答
  • 2020-12-04 17:00

    Considering the button resides in an iframe and due to cross-domain restrictions, altering this is unlikely.

    0 讨论(0)
  • 2020-12-04 17:04

    You should use this now: https://plus.google.com/share?url=URL_HERE

    0 讨论(0)
  • 2020-12-04 17:11

    You can overlay an image and keep functionality:

    http://tcg.ellininc.com/buttonTest/

    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
    <style>
    .my_custom_googleplusone{
        overflow: hidden;
        background-image: url(styled.png);
        background-repeat: no-repeat;
        height: 30px;
        width: 161px;
        position: absolute;
        pointer-events: none;
    }
    .my_custom_googleplusone:hover{
        visibility: hidden;
    }
    
    .hideMe {
        height: 30px;
        width: 161px;
        overflow: hidden;
        position: absolute;
        z-index: -1; !Important
    }
    </style>
    </head>
    <body>
        <div><g:plusone></g:plusone></div><br />
        <div class="my_custom_googleplusone"></div>
        <div class="hideMe"><g:plusone></g:plusone></div>
    </body>
    

    My apologies for any extraneous css.

    0 讨论(0)
提交回复
热议问题