国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

JS實(shí)現(xiàn)的新聞列表自動滾動效果示例

2024-05-06 15:42:44
字體:
供稿:網(wǎng)友

本文實(shí)例講述了JS實(shí)現(xiàn)的新聞列表自動滾動效果。分享給大家供大家參考,具體如下:

<!DOCTYPE html><html lang="en"><head>  <meta charset="UTF-8">  <title>Title</title>  <style type="text/css">    #box{width:260px;height:100px;margin:0 auto;border:2px solid red;overflow: hidden}    ul{padding:0;margin:0;list-style: none;overflow: hidden}    ul li{height:24px;line-height: 24px;padding-left:10px;}    a{text-decoration: none;color:#000;}    a:hover{color:#f00}  </style></head><body><div id="box">  <ul id="con1" onMouseOut="Up()" onMouseOver="Stop()">    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >1,課程html</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >2,課程css</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >3,課程js</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >4,課程jquery</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >5,課程html5</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >6,課程css3</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >7,課程hp</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >8,課程bpootstrap</a> </li>    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >9,課程apicloud</a> </li>  </ul>  <ul id="con2"></ul></div></body><script type="text/javascript">  var box=document.getElementById("box");  var con1=document.getElementById("con1");  var con2=document.getElementById("con2");  var s=document.getElementsByTagName("a");  var speed=50;  con2.innerHTML=con1.innerHTML;  function ScrollUp(){    if( box.scrollTop>=con1.scrollHeight){      box.scrollTop=0;    }else      box.scrollTop++;  }  var i=setInterval("ScrollUp()",speed);  function Stop(){    clearInterval(i);  }  function Up(){    i=setInterval("ScrollUp()",speed);  }</script></html>            
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 当雄县| 龙泉市| 库车县| 周宁县| 旺苍县| 旬邑县| 保康县| 永嘉县| 和政县| 连州市| 房产| 奉新县| 黔江区| 正镶白旗| 区。| 鄂托克旗| 沂源县| 田阳县| 石台县| 谷城县| 利辛县| 哈巴河县| 静海县| 彰化市| 平凉市| 三河市| 三门峡市| 汝州市| 天门市| 东乡县| 从江县| 马公市| 泽州县| 建宁县| 家居| 杭锦旗| 绥德县| 广宗县| 秦安县| 宁津县| 肃宁县|