如何实现 文字的滚动,最好有代码示例。还有通过css样式表实现文字跳跃的动态效果

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript">
    function init(){
    var div=document.getElementById("test");
    var value=div.innerHTML;
    var l=value.length;
    div.innerHTML=value.substr(1,l-1)+value.substring(0,1);
    window.setTimeout(init,100);
    }
    window.onload=init;
    </script>
    </head><body>
    <div id="test">just a test</div>
    </body>
    </html>
    类似这样试试  跳跃怎么跳啊
      

  2.   


    <div class="cnt"><p align="center" ><marquee style="WIDTH:60%; HEIGHT:40px" scrollamount="4" direction="left" ><div  align="left" ><font color="#ff2200" ><font face="隶书" ><font size="6" >
    文字从右向左滚动效果
    </font ></font ></font ></p></div >
      

  3.   

    <style type="text/css">
    *{margin:0;padding:0;}
    body { padding: 60px }
    #panel {position: relative; border: 1px solid #0050D0;background: #96E555; cursor: pointer}
    </style>
    <script src="../../scripts/jquery-1.3.1.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function(){
        $("#panel").click(function(){
        $(this).animate({left: "500px",height:"200px"}, 3000);
    })
    })
    </script>
    </head>
    <body>
    <div id="panel">看我!看我!!再看我!!!我在跳动啊~你真笨~</div>
    </body>