如何设计 Facebook Like 按钮的样式?
我正在尝试将 css 应用到 facebook 之类的按钮。我知道更改“点赞”按钮的外观违反了服务条款。我想做的就是更改 facebook like 按钮的背景,使其与我的网站保持一致。
我用 google 搜索了一下,发现了几篇文章,如果我使用 fbml,我可以设置类似 facebook 的按钮样式,因为 fbml 不使用 iframe。问题是,看起来 facebook 也在使用 iframe 来实现 fbml。
据我所知,我无法直接设置 iframe 中包含的网页的样式。
是否有用于样式设置的 api(在我的例子中,仅更改背景!!)喜欢按钮?
I am trying to apply css to facebook like button. I know that it is violating TOS to change how the like button look. All I am trying to do is change the background of facebook like button to make it consistence with my website.
I googled about it and found several articles that I can style facebook like button if I am using fbml because fbml does not use iframe. The problem is, it looks like facebook is using iframe for fbml as well.
as far as I know, I can't directly style a webpage that is included in an iframe.
Is there an api for styling (in my case, changing background only!!) the like button?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用深色或浅色主题。
您无法对其
src
属性不是您的域的iframe
执行任何操作。我唯一能想到的是使用绝对定位、不透明度和 z-index 的丑陋黑客,但我认为这不值得一提。
You can use dark or light theme.
You can not do anything to an
iframe
of whom'ssrc
attribute is not your domain.The only thing I can think of is an ugly hack using absolute positioning, opacity and z-index, but I don't think it is worth mentioning.
用另一个图像来覆盖图像怎么样?我知道这不是最佳做法,但你无法更改 Facebook 品牌的“点赞”按钮
how about over riding the image with another? i know its not the best practice, but u can't change the Facebook branded "Like" button