jquery自动滚动为div [英] jquery automatic scroll for a div

查看:155
本文介绍了jquery自动滚动为div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面加载时使用jquery自动滚动显示div,当我将鼠标指向scroolling文本时,它会停止滚动直到我删除滚动文本



i am using a jquery automatic scroll for a div when page load and when i point the mouse on scroolling text it shuold stop scrolling until i remove the on the scrolling text

$(document).ready(function () {
    $(#demo).scrollbox({
        linear: true,
        step: 1,
        delay: 0,
        speed: 100
    });
});



和我使用的CSS


and the css i used

.scroll-text {
  border: 1px solid red;
  width: 400px;
  height: 4.5em;
  overflow: hidden;
}
.scroll-text tr {
  width: 800px;
  height: 100px;
 overflow: hidden;
  margin: 0;
}
.scroll-text tr td {
  height: 1.5em;
}

并且aspx页面是

and the aspx page is

<div id="#demo">
    <tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>

<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
</div>

plz帮帮我

谢谢

plz help me
thanks

推荐答案

document )。ready( function (){
(document).ready(function () {


(#demo).scrollbox({
linear: true
步骤: 1
延迟: 0
速度: 100
});
});
(#demo).scrollbox({ linear: true, step: 1, delay: 0, speed: 100 }); });



和我使用的CSS


and the css i used

.scroll-text {
  border: 1px solid red;
  width: 400px;
  height: 4.5em;
  overflow: hidden;
}
.scroll-text tr {
  width: 800px;
  height: 100px;
 overflow: hidden;
  margin: 0;
}
.scroll-text tr td {
  height: 1.5em;
}

并且aspx页面是

and the aspx page is

<div id="#demo">
    <tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>

<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
<tr>
    <td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
    </tr>
</div>

plz帮帮我

谢谢

plz help me
thanks


问题

Problem


  1. 您还没有使用过css类div。
  2. 所以,你应该使用如下。


  1. You have not used the css class in the div.
  2. So, you should use like below.
<div id="#demo" class="scroll-text">
</div>



写完之后,你所有的css都将被应用。

  • 这是什么滚动框功能?您使用的是 jQuery 插件吗?
  • 请参阅 - 如何使用jquery自动滚动到目标div? [ ^ ]了解一种实施方式。否则,您可以查看来自 Google [ ^ ]。


    After you write this, all you css will be applied.

  • What is this scrollbox function? Are you using any jQuery Plug-ins?
  • Refer - How to auto scroll to target div with jquery?[^] to know one type of implementation. Otherwise you can check any link from Google[^].





    建议

    请查看 FireBug 控制台窗口在 FireFox 中,如果您看到任何错误。如果您有任何错误,请尝试解决错误...



    Suggestion
    Please check the FireBug console window in FireFox, if you see any errors or not. Try to resolve the errors, if you have any...


    这篇关于jquery自动滚动为div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆