【问题标题】:How can i add div inside a facebook iframe [closed]我如何在 facebook iframe 中添加 div [关闭]
【发布时间】:2013-03-23 06:02:30
【问题描述】:

我需要像使用蓝色和白色的 facebook 弹出窗口一样更改 iframe 背景颜色。我该如何配置它,这可以代替使用背景图片吗

这里我添加了代码供您查看

<div id="fb">
<div id="fb-close"></div>
<div id="fblike">
<div id="fbclose"></div>
<div class="eliminater"></div>
<iframe src="//www.facebook.com/plugins/likebox.php?href=<?php echo esc_url(get_option('fb_likeurl')); ?>&amp;width=402&amp;height=255&amp;colorscheme=light&amp;show_faces=true&amp;border_color=blue;&amp;stream=false&amp;header=false&amp;appId=329902783740649" scrolling="no" frameborder="1" style="border-width: medium medium 71px; border-style: none; border-color: blue; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; margin-top: -21px; width: 397px; height: 239px; margin-left: 8px;background-color:#fff;" allowTransparency="true"></iframe>
</div>
</div>

css 文件在下面

#fb {
display:block;
background-color:;
width:100%;
height:100%;
position:fixed;
top:0;
left:0;
z-index:99999;
}

#fb-close {
width:100%;
height:100%
}

#fblike {
background:white;
width:420px;
height:270px;
position:absolute;
top:50%;
left:50%;
margin:-135px 0 0 -210px;
}

#fbclose {
float:right;
cursor:pointer;
background:url(../images/fanclose.png) repeat;
height:15px;
padding:20px;
position:relative;
padding-right:40px;
margin-top:-20px;
margin-right:-22px;
}

.eliminater{
height:1px;
width:366px;
margin:0 auto;
background:#fff;
margin-top:16px;
position:relative;
margin-left:20px;
}

【问题讨论】:

  • 如果你给我你的密码和用户名,我可以为你做:)...你有代码给我们看吗?我们可以在这里找到解决方案,而不是读心术..
  • 现在你可以查看我的代码 Che Jug

标签: php facebook-iframe


【解决方案1】:

试试这个,我认为这很好。

var html = "<style>Background-image:(url:yoururl);</style>";

$("#frameID").contents().find("head").append(html);

【讨论】:

  • 我可以使用图像作为背景而不是 div
  • @raj 查看我的更新答案。
  • @raj 此代码是否有效。
  • 它的工作谢谢harshit
  • @raj 如果它符合您的目的并且不要忘记投票,请考虑绿色检查此答案。
猜你喜欢
  • 2013-08-14
  • 1970-01-01
  • 1970-01-01
  • 2013-11-11
  • 1970-01-01
  • 1970-01-01
  • 2013-01-09
  • 1970-01-01
  • 2018-07-13
相关资源
最近更新 更多