使用jQuery滚动div [英] Scrolling a div with jQuery
问题描述
我试图在一个容器内的容器中创建一个div,可以用jQuery中的上下箭头滚动。
I am attempting to create a div in a container within a container which is scrollable with up and down arrows in jQuery.
我可以找到哪个希望使用的是
http://www.dynamicdrive.com/dynamicindex11/scrollc2。 htm
The only thing I can find which I wish to use was http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm
我会开始尝试将其转换为jQuery,但它不使用像ilayer和layer这样的标签。如果可能,我想使用更多的标准标签。
I would've started attempting to convert that to jQuery, however it apepars to use tags like ilayer and layer. I would like to use more standard tags if possible.
任何指向正确方向的指针都会受到高度赞赏。
Any pointers in the right direction would be highly appreciated.
推荐答案
我不知道这是否是你想要的,但你知道你可以使用CSS overflow
属性创建滚动条?
I don't know if this is exactly what you want, but did you know you can use the CSS overflow
property to create scrollbars?
CSS:
div.box{
width: 200px;
height: 200px;
overflow: scroll;
}
HTML:
<div class="box">
All your text content...
</div>
这篇关于使用jQuery滚动div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!