0
我想爲我的博客添加Google徽章。目前,我加入了谷歌加徽章到我的博客,並試圖通過下面的代碼將圖像添加到它:將頭像添加到Google加徽章的最佳方式是什麼?
<div class="g-plus" data-width="208" data-height="69" style="float:left; direction:ltr;text-align:left" data-href="//plus.google.com/116527224364668694256" data-rel="author"></div>
<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);
var iab = document.getElementsByClassName("iab")[0];
iab.style.backgroundimage = "url('https://googledrive.com/host/0B7YvaD77pFw9cDczZnBRanFFVWs/img/avatar.jpg')";
})();
</script>
和輸出是這樣的:
我想加上我自己的頭像到它,但它不能正常工作。這段代碼的問題是什麼?最好的方法是什麼?