CSS Like Box 上的白色背景
FB Like Box 当前的深色/浅色样式不适用于透明/半透明页面布局。点赞框最终继承了页面的属性,变得透明。
我尝试通过创建一个 fb.css 文件并进行必要的更正来重置 facebook like box css,并将 css="fb.css" 添加到代码中,如所示已在该论坛上工作。然而它似乎不起作用。
有没有办法让 FB Like Box 在透明页面上使用时具有简单的白色背景?我可以通过编辑属性 .connect_widget { 在 firebug 中完成此操作 背景颜色:#FFFFFF; }
有问题的网站是 http://www.laudanumonline.com,就像右下角的方框一样。
感谢您的任何帮助。
The current dark/light styles for the FB Like Box dont work on a transparent/semi transparent page layout. The like box ends up inheriting the attributes of the page, becoming transparent.
I tried to reset the facebook like box css by creating a fb.css file with the necessary corrections, and adding css="fb.css" into the code as indicated has worked on this forum. However it does not seem to work.
Is there a way to get the FB Like Box to have a simple white background when used on a transparent page? I was able to accomplish this in firebug by editing the attribute .connect_widget {
background-color: #FFFFFF;
}
The website in question is http://www.laudanumonline.com, like box is in the lower right corner.
Thanks for any assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以尝试使用
!important
覆盖 Facebook 设置的样式:You can try using
!important
to override the styles set by Facebook:您可以通过 Firebug 执行此操作,因为它将样式添加为内联样式。
实现此目的的一种方法是使用一些 jQuery 将样式添加为内联样式。类似于
$('.connect_widget').css({'background-color':'#fff');
不过,您可能需要将其设置为事件,除非该框可见页面加载时。
You can do this via Firebug because it adds the style as an inline style.
One way to do this is to add the style as an inline-style with some jQuery. Something like
$('.connect_widget').css({'background-color':'#fff');
You would probably need to set this to an event, though, unless the box is visible on page load.
您可能不会设置“.connect_widget”div 的样式,但您可以设置它所在的 iframe 的样式,甚至可以设置 iframe 所在的 div 的样式。在我的例子中,我的 Like 框位于 div“#fb-platform”中,所以我可以轻松做到这一点:
或
任何这些选项都可以正常工作。
类似的框仍然是透明的,但父 iframe/div 不是,因此 - 白色背景。
You may not style the ".connect_widget" div, but you can style the iframe it's in, or even the div that the iframe is in. In my case, my like box is located in a div "#fb-platform" so I can easily do this:
or
Any of these options works fine.
The like box is still transparent, but the parent iframe/div isn't, therefore - white background.
为什么不直接将该连接小部件放入单个单元格表格中并将表格背景设置为白色?这就是我在 www.earthakit.com(内页,不是主页)右侧栏目中所做的事情。
Why not just put that connect widget in a single cell table and make the table background white? That's what I did on www.earthakitt.com (inner pages, not the homepage) in the column on the right.
最简单的方法是添加 style="background:#fff;"到元素
The easiest way is to add style="background:#fff;" to element
我用这个并且有效。 :) 将代码放在 css 文件的末尾。
I use this and it works. :) Put the code at the end of your css file.