CSS Like Box 上的白色背景

发布于 2024-12-14 21:46:07 字数 416 浏览 4 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

青衫负雪 2024-12-21 21:46:07

您可以尝试使用 !important 覆盖 Facebook 设置的样式:

.connect_widget {background-color: #fff !important;}

You can try using !important to override the styles set by Facebook:

.connect_widget {background-color: #fff !important;}
余生共白头 2024-12-21 21:46:07

您可以通过 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.

他是夢罘是命 2024-12-21 21:46:07

您可能不会设置“.connect_widget”div 的样式,但您可以设置它所在的 iframe 的样式,甚至可以设置 iframe 所在的 div 的样式。在我的例子中,我的 Like 框位于 div“#fb-platform”中,所以我可以轻松做到这一点:

#fb-platform iframe {background-color: #fff; }

#fb-platform .fb-like-box {background-color: #fff; }

任何这些选项都可以正常工作。

类似的框仍然是透明的,但父 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:

#fb-platform iframe {background-color: #fff; }

or

#fb-platform .fb-like-box {background-color: #fff; }

Any of these options works fine.

The like box is still transparent, but the parent iframe/div isn't, therefore - white background.

别念他 2024-12-21 21:46:07

为什么不直接将该连接小部件放入单个单元格表格中并将表格背景设置为白色?这就是我在 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.

|煩躁 2024-12-21 21:46:07

最简单的方法是添加 style="background:#fff;"到元素

The easiest way is to add style="background:#fff;" to element

木森分化 2024-12-21 21:46:07

我用这个并且有效。 :) 将代码放在 css 文件的末尾。

span>iframe{background:#ffffff !important;}

I use this and it works. :) Put the code at the end of your css file.

span>iframe{background:#ffffff !important;}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文