更改 WordPress 下的 Tweetmeme 按钮颜色
我浏览了 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该按钮使用图像精灵作为其背景和悬停状态。但这不是重点,因为按钮是从 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.
您可以随时等待他们的专业版按钮。我听说它会在不久的将来推出。
You could always wait for their Pro version of the button. I hear it's due out in the not too distant future.