2

私は初心者の Web プログラマーです。助けてください。

私はこのコードを持っています:

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
            <g:plusone size="tall"></g:plusone>

彼を非同期スニペットにアップグレードする必要があります: http://googlewebmastercentral.blogspot.com/2011/07/1-button-now-faster.html

私の問題は、Google構成ツールで選択する画像サイズが
<g:plusone size="tall"></g:plusone>、Webサイトに既にあるものと同じサイズではないことです。

前もって感謝します

4

2 に答える 2

2

あなたが正しい考えを得ているかどうかはわかりません。ボタンを変更するのではなく、スクリプトの動作を変更します。<g:plusone size="tall"></g:plusone>そのままにして、それに応じてスクリプトを変更してください

于 2011-08-02T13:23:31.453 に答える
2

「高い」を選択

<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall"></g:plusone>

<!-- Place this tag after the last plusone tag -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

詳細については、こちらの+1 タグ パラメータセクションを参照してください: http://code.google.com/apis/+1button/

于 2011-08-02T13:25:49.543 に答える