【问题标题】:Twitter embedded making content dropTwitter嵌入使内容下降
【发布时间】:2016-04-28 04:28:04
【问题描述】:

我目前正在编写一个需要基本 twitter 嵌入式小部件的网站。我已将小部件放在<aside> 标记中,该标记位于主要<article> 的右侧。小部件将我的文章标签强制放在页面下方,我不明白为什么,有人可以启发我吗?

HTML:

   <article>
        <h1>Welcome</h1>
        <p>Lorem ipsum </p>
    </article>

    <aside>
        <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/LydbrookAth" data-widget-id="690232327222509569">  </a>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>      
    </aside>

CSS:

article {
    width: 70%;
    display: inline-block;
    border-style: dashed;
    height: 600px;

}

aside {
    width: 28%;
    display: inline-block;
    border-style: dashed;
    height:inherit;
}

【问题讨论】:

    标签: html css twitter


    【解决方案1】:

    vertical-align:top; 添加到article 以使其具有特定的对齐方式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-14
      • 1970-01-01
      • 1970-01-01
      • 2013-04-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多