首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何自定义嵌入twitter推文的高度和宽度

如何自定义嵌入twitter推文的高度和宽度
EN

Stack Overflow用户
提问于 2020-10-12 20:47:37
回答 1查看 135关注 0票数 1

我试图在我的网站上嵌入一条twitter推文,但我无法更改高度和宽度。我如何才能做到这一点。。。

下面是twitter为这条推文生成的代码

代码语言:javascript
复制
<blockquote class="twitter-tweet">
  <p lang="en" dir="ltr">Iustitia aims at getting justice for the sexually harrassed by using technology. Our mission is to help sexually assaulted girls back on their feet and be inculcated back into the community. The goal is to save at least 359 girls every year. <a href="https://twitter.com/savethegirl_ng/status/1281556230897569792?s=20">pic.twitter.com/tAfPl7My2A</a></p>&mdash;
  iustitia (@savethegirl_ng) <a href="https://twitter.com/savethegirl_ng/status/1281556230897569792?ref_src=twsrc%5Etfw">July 10, 2020</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

EN

回答 1

Stack Overflow用户

发布于 2020-10-12 20:51:44

您可以像这样更改twitter-tweet的高度和宽度:

CSS

代码语言:javascript
复制
.twitter-tweet {
  width: 10px;
  height: 10px;
}

或者如果你想要一个更内联的解决方案:

代码语言:javascript
复制
<blockquote style="width:10px; height:10px" class="twitter-tweet">
  <p lang="en" dir="ltr">Iustitia aims at getting justice for the sexually harrassed by using technology. Our mission is to help sexually assaulted girls back on their feet and be inculcated back into the community. The goal is to save at least 359 girls every year. <a href="https://twitter.com/savethegirl_ng/status/1281556230897569792?s=20">pic.twitter.com/tAfPl7My2A</a></p>&mdash;
  iustitia (@savethegirl_ng) <a href="https://twitter.com/savethegirl_ng/status/1281556230897569792?ref_src=twsrc%5Etfw">July 10, 2020</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64318227

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档