简体   繁体   English

Div像推特一样水平调整大小

[英]Div resize horizontally like in twitter

I want to add functionality like in twitter when scroll down div elongates horizontally when click more button. 当单击更多按钮时,当向下滚动div水平拉长时,我想添加类似twitter的功能。 How can i do so? 我该怎么办?

If you're referring to the tweet stream on twitter.com then it's a bit more complex than elongating a <div> . 如果您是指twitter.com上的tweet流,那么它比延长<div>复杂得多。 Behind the scenes what's happening is javascript running on the page make an AJAX call for more tweets. 幕后发生的事情是页面上运行的javascript进行了AJAX调用,以发送更多推文。 That data is then rendered to HTML and appended to the container <div> . 然后,该数据呈现为HTML并附加到容器<div> In addition the "elongation" effect is likely an animation that simply alters the height of the newly appended content. 另外,“伸长率”效果很可能是简单地改变新添加内容的高度的动画。

A great place to start is with jQuery and the Getting Started with jQuery tutorial . 一个很好的起点是jQuery和jQuery 入门教程

Also worth checking out are the doc pages for: 同样值得一看的是以下内容的文档页面:

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

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