【发布时间】: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;
}
【问题讨论】: