JAVASCRIPT DIV used to replace non-spacing to achieve the effect of rolling news

Related Tags:

  Code as follows: 
<html>
  <Head 
  <title> New Page 2 </ title> 
  </ Head> 

<body>


  <div Id=demo style=overflow:hidden;height:60px> 
  <div Id=demo1> 
  111111111111111 <br> 
  222222222222222 <br> 
  333333333333333 <br> 
  444444444444444 <br> 
555555555555555
  </ Div> 
  <div Id=demo2> </ div> 
<script>
  Var t = demo.scrollTop 
  Demo2.innerText = demo1.innerText 
  Function qswhMarquee () ( 
  If (demo2.offsetTop-demo.scrollTop <= 0) 
  Demo.scrollTop-= demo1.offsetHeight 
  Else 
  Demo.scrollTop demo.scrollTop = 3 / / 3 that of a mobile material 
  ) 
  SetInterval (qswhMarquee, 1000) / / 1000 that the time rolling 
  </ Script> </ body> 

  </ Html> 

Related articles:

CSS attribute table
  Margin properties:    Margin attributes into top-margin, margin-right, and margin-bottom, margin-left margin and five properties, respectively, said BOX content of the distance from the border, it is the numerical value of the property units, it could be length, or the percentage ...
Website: foreigners handwritten Chinese characters
  English portal site with the Chinese is not only the difference between the use of Chinese and English differences.    The Chinese font complexity, and Chinese fonts on the computer design is relatively backward, which makes Chinese website design is more difficult than English web...
Five learning css
  2.6 pseudo-classes and pseudo-pseudo-type elements and pseudo-pseudo-class elements and pseudo-sytle element selector can be applied to the document does not exist in the structure.    Can be applied to the phantom classes, and phantom classes from the state or some elements of the...
How to standardize on the CSS sel
  Web developers (that is, you) can be through the creation of id and CSS class name and use these names to the div as well as other page elements, labelling to be labelled.    The developers, in the name redefined XHTML tags (tags) CSS selectors, and must ensure that its pre-defined...
How important search engine in the end?
  If you have never been through the search engine to find its own site, you may think that this is not enough to your site successful, this kind of thinking is not right.    Admits # 1    I think some time in the search engine, the high-ranking very important, I had to s...