[英]How to fix viewport width issue when using Google+ comments on responsive website?
My website is rendered perfectly fine on desktops as well as mobile devices and without any orientation related viewport issues ...until I implemented Google+ comments, which will set the width of the page to whatever width is defined here: 我的网站在台式机和移动设备上均呈现完美的状态,并且没有任何与方向相关的视口问题...直到我实施Google+评论,这会将页面的宽度设置为此处定义的任何宽度:
<!-- Google comments -->
<script src="https://apis.google.com/js/plusone.js">
</script>
<div class="g-comments"
data-href="[URL-OF-PAGE-HERE]"
data-width="720"
data-first_party_property="BLOGGER"
data-view_type="FILTERED_POSTMOD">
</div>
See example page here . 在此处查看示例页面。 Resize the window (horizontally) to see the issue in effect.
调整窗口大小(水平)以查看问题所在。
Is this something that could be fixed somehow, and does the issue truly lie within Google's code? 是否可以通过某种方式解决此问题,并且问题确实在Google的代码之内吗?
通过使用data-width="100%"
,注释框将完全消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.