更改 WordPress 下的 Tweetmeme 按钮颜色

发布于 2024-08-29 10:13:33 字数 152 浏览 4 评论 0原文

我浏览了 TweetMeme 插件代码和 IANA JS Guru,但我找不到任何明智的方法来进行特定的样式更改;您可以添加特定于 div 的 CSS 特性,但我正在讨论更改按钮的静止颜色和悬停颜色。

我用谷歌搜索了一下,似乎没有人在这里问过这个问题,所以我想我应该这样做。

I've had a poke around in the TweetMeme plugin code and IANA JS Guru, but I cant find any sensible way to make specific styling changes; you can add div-specific CSS characteristics, but I'm talking about changing the resting colour and the hover colour of the button.

I've googled around and noone seems to have asked it on here so I thought I should.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

熊抱啵儿 2024-09-05 10:13:33

该按钮使用图像精灵作为其背景和悬停状态。但这不是重点,因为按钮是从 iframe 中的 TweetMeme 服务器加载的,这使得覆盖样式变得非常非常复杂(如果可能的话)。如果可能的话,您需要在所有内容加载后使用 javascript 更改 iframe 的内容。您不能仅仅编辑插件来使其满足您的需求。

如果您需要控制其外观和感觉,我建议找到一个将其元素公开给 CSS 样式的插件。由于有很多这样的插件,这可能不会太难。

The button uses an image sprite for its background and hover states. But this is beside the point because the button is loaded from the TweetMeme server in an iframe, which makes overriding the styles much, much more complicated (if possible at all). If it were possible, you'd need to alter the content of the iframe with javascript after everything has loaded. You can't just edit the plugin to make it serve what you want.

I suggest finding a plugin that exposes its elements to CSS styling if you need to have control over its look and feel. Since there are many such plugins, that probably won't be too hard.

牵强ㄟ 2024-09-05 10:13:33

您可以随时等待他们的专业版按钮。我听说它会在不久的将来推出。

You could always wait for their Pro version of the button. I hear it's due out in the not too distant future.

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