如何将推文居中? [英] how to center a tweet?

查看:107
本文介绍了如何将推文居中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Twitter提供了嵌入推文的代码.例如,我有:

Twitter provides the code to embed a tweet. For example I have:

<blockquote class="twitter-tweet"><p>NoSQL space gradually becoming SlowSQL space.</p>&mdash; Big Data Borat (@BigDataBorat) <a href="https://twitter.com/BigDataBorat/statuses/349216251853287425">June 24, 2013</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

我试图将上述代码封装到标签< div style ="margin:auto"> ...</div> 中,但该推文仍在左侧对齐.如何在任何页面中将其水平居中?

I have tried to enclose the above code into a tag <div style="margin:auto">...</div> but the tweet appears yet aligned on the left. How to center it horizontally in a whatever page?

推荐答案

我遇到了同样的问题,唯一可行的解​​决方案是更改类

I came across the same issue and the only solution worked for me was to change the class

之前

<blockquote class="twitter-tweet" data-lang="en">

之后

<blockquote class="twitter-tweet tw-align-center" data-lang="en">

这篇关于如何将推文居中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆