Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
谷歌+;iframe中的“编辑和注释”对话框_Iframe_Google Plus - Fatal编程技术网

谷歌+;iframe中的“编辑和注释”对话框

谷歌+;iframe中的“编辑和注释”对话框,iframe,google-plus,Iframe,Google Plus,我在页面的iframe中有一个Google+快速按钮。当按钮悬停时,“公开推荐此为…”弹出窗口显示,但由于按钮位于iframe的右边缘,弹出窗口被切断。我想强制弹出窗口显示在Google+按钮的左侧,但我看不到任何关于如何执行此操作或是否可以执行此操作的信息。这可能吗 这是我的密码: MYDOMAIN1.COM/parentpage.html: <html> <head></head> <body> <div class="content"

我在页面的iframe中有一个Google+快速按钮。当按钮悬停时,“公开推荐此为…”弹出窗口显示,但由于按钮位于iframe的右边缘,弹出窗口被切断。我想强制弹出窗口显示在Google+按钮的左侧,但我看不到任何关于如何执行此操作或是否可以执行此操作的信息。这可能吗

这是我的密码:

MYDOMAIN1.COM/parentpage.html:

<html>
<head></head>
<body>

<div class="content">
    <iframe src="http://mydomain2.com/myiframe.html"></iframe>
</div>

<div class="sidebar">
    ....
</div>

</body>
</html>
<html>
<head></head>
<body>

<iframe src="https://plusone.google.com/_/+1/fastbutton?usegapi=1
    &bsv=o&size=tall&count=true&align=left&hl=en-US
    &origin=http%3A%2F%2Fwww.mydomain1.com
    &url=http%3A%2F%2Fwww.mydomain1.com%2Fmypage%2F
    &parent=http%3A%2F%2Fwww.mydomain1.com" id="I0_1234567890123"
    name="I0_1234567890123" allowtransparency="true" frameborder="0"
    scrolling="no" data-gapiattached="true" title="+1">
</iframe>

</body>
</html>

....
MYDOMAIN2.COM/myiframe.html:

<html>
<head></head>
<body>

<div class="content">
    <iframe src="http://mydomain2.com/myiframe.html"></iframe>
</div>

<div class="sidebar">
    ....
</div>

</body>
</html>
<html>
<head></head>
<body>

<iframe src="https://plusone.google.com/_/+1/fastbutton?usegapi=1
    &bsv=o&size=tall&count=true&align=left&hl=en-US
    &origin=http%3A%2F%2Fwww.mydomain1.com
    &url=http%3A%2F%2Fwww.mydomain1.com%2Fmypage%2F
    &parent=http%3A%2F%2Fwww.mydomain1.com" id="I0_1234567890123"
    name="I0_1234567890123" allowtransparency="true" frameborder="0"
    scrolling="no" data-gapiattached="true" title="+1">
</iframe>

</body>
</html>


MYDOMAIN1.COM上的页面是Wordpress PHP页面。MYDOMAIN2.COM上的iframe内容是一个ASP应用程序,因此是分离的。

https://plusone.google.com/_/+1/fastbutton?..
不是公共API,您不应该直接使用它。相反,请使用支持
expandTo
参数的,在该参数中可以按所需方向定位气泡

<html>
<head></head>
<body>

    <!-- Place this tag where you want the +1 button to render. -->
    <div class="g-plusone" data-annotation="inline" data-width="300" data-href="http://example.com" expandTo="bottom" ></div>

    <!-- Place this tag after the last +1 button 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/platform.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
    </script>

</body>
</html>

(功能(){
var po=document.createElement('script');po.type='text/javascript';po.async=true;
po.src=https://apis.google.com/js/platform.js';
var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);
})();

abraham,他已经出城了。返回并将示例代码包含在您的答案中,但没有显示任何内容,也没有明显的错误。这将被加载到Wordpress页面。我尝试将
$
预编为
(函数()
。这没有什么区别。你能想到什么会导致Google+按钮根本不出现吗?亚伯拉罕,我尝试了包含按钮的方法,效果很好。我不太理解这些区别,但我已经测试过了,一切都很好。谢谢你的回答。