简体   繁体   English

在Twitter嵌入式推特上自定义样式

[英]customize styling on Twitter embedded tweet

I am trying to simply add some css to my embedded tweets on my site 我试图将一些CSS添加到我网站上的嵌入式推文中

This seems like it ought to be ridiculously easy, and it was actually working, then suddenly stopped. 这似乎应该非常简单,并且实际上已经开始工作,然后突然停止了工作。 My code is: 我的代码是:

<blockquote class="twitter-tweet" style="background-color: #E1CFB9 !important;"><p>People scoff at emoticons. How else do you convey body language in a 140char tweet with a perfect stranger? More :-) == Less flame</p>&mdash; Jeff Madsen (@codebyjeff) <a href="https://twitter.com/codebyjeff/status/263808956697292801" data-datetime="2012-11-01T01:05:31+00:00">November 1, 2012</a></blockquote>

<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

<style>
.twitter-tweet-rendered{
    padding-left: 20px;
    background-color: #E1CFB9 !important;
    border: 1px solid #77947E !important;
}
.standalone-tweet{
    background-color: #E1CFB9 !important;           
}
</style>

The only trick involved last time was to call the js file to let it re-render the blockquote, then apply the css on top. 上次涉及的唯一技巧是调用js文件以使其重新呈现blockquote,然后在顶部应用css。

No idea what changed, but the .standalone-tweet background no longer applies, and every css, javascript, delayed javascript, whatever trick I can think of will not work. 不知道发生了什么变化,但是.standalone-tweet背景不再适用,并且每一个CSS,JavaScript,延迟的javascript,无论我想到什么技巧都行不通。

Any ideas? 有任何想法吗?

您是否尝试过呢?

<script src="http://platform.twitter.com/widgets.js" charset="utf-8"></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM