目前,Google Plus 徽章会自动响应宽度的变化:https ://developers.google.com/+/plugins/badge/
我们的新网站设计使用 Bootstrap 进行响应式布局,我们如何才能使其具有响应性?
这是我们当前的徽章代码:
<!-- Place this tag where you want the badge to render. -->
<div class="g-plus" data-width="230" data-href="//plus.google.com/102018846923934084444" data-rel="publisher"></div>
<!-- Place this tag after the last badge 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>
如您所见,默认宽度为 230 像素。有点困惑如何干净地做到这一点?
谢谢!