久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區(qū)

標(biāo)題: 代碼修改求助 [打印本頁]

作者: xiaoyun1981    時間: 2021-9-12 18:38
標(biāo)題: 代碼修改求助
<style type="text/css">
.effshadow
{
  position: relative;
}
.effshadow:after
{
z-index: -1;
position: absolute;
content: "";
top: 15px;
left: 8px;
right: auto;
width: 50%;
height: 10%;
bottom: 80%;
max-width: 300px;
  background: #777;
  -webkit-box-shadow: 0 15px 10px #777;
  -moz-box-shadow: 0 15px 10px #777;
  box-shadow: 0 15px 10px #777;
  -webkit-transform: rotate(183deg);
  -moz-transform: rotate(183deg);
  -o-transform: rotate(183deg);
  -ms-transform: rotate(183deg);
  transform: rotate(183deg);
}  
.effbox h1{
        text-align:left;
        height:25px;
        line-height:25px;
        position:relative;
        top:0px;
        color:#009ad9;
        font:20px/1.5 Tahoma,'Microsoft Yahei','Simsun';
        float:left;
         margin:0px;
}
.effbox h3{
        text-align:center;
        position:relative;
        font:12px/1.5 Tahoma,'Microsoft Yahei','Simsun';
         margin:0px;
         height:30px;
}
.effbox {
        width:319px;
        height:37px;
        background:#FFF;
}
.shadowcon { width:100%; height:25px; margin:6px 5px 6px 10px; overflow:hidden;}
#rollBox{ height:25px; width:255px; overflow:hidden;list-style:none; margin:0; padding:0; position:relative; padding-left:5px; margin:50px auto; background:#FFf; cursor:pointer;}
.shadowcon li { list-style:none; line-height:25px; text-align:left;}
</style>
<div class="effbox">
<div class="effbox effshadow">
        <div class="shadowcon">
        <h3>
    <ul style="margin:5px 0 0 0;" id="rollBox">
    [loop]
    <li><a href="{url}" title="{title}"{target}>{title}({starttime})</a></li>
    [/loop]
    </ul>
    </h3></div></div></div>
   <script type="text/javascript">
var rollText={
        go:null,
        oParentUl:null,
        oUlH:null,
        liArr:null,
        childNode:null,
        timeout:null,
        run:function(id,delay){
                var oLiFirst=this.liArr[0];
                var liMarTop = oLiFirst.style.marginTop;
                var liTopNum=parseInt(liMarTop);
                var c = Math.abs(liTopNum);
                if(c< parseInt(this.oUlH)){
                        c++;
                        oLiFirst.style.marginTop ='-' + c + 'px';
                }else if(Math.abs(liTopNum)== parseInt(this.oUlH)){
                        clearInterval(this.go);
                        this.oParentUl.removeChild(oLiFirst);
                        this.oParentUl.appendChild(oLiFirst);
                        this.liArr[this.liArr.length-1].style.marginTop='0px';
                        this.timeout=setTimeout(function(obj,id,childtags,delay){return function(){obj.start(id,childtags,delay);};}(this,id,this.childNode,delay),delay);
                }

        },
        start:function(id,childtags,delay){

                this.childNode=childtags;
                this.oParentUl=document.getElementById(id);
                this.oUlH=this.oParentUl.currentStyle?this.oParentUl.currentStyle['height']:window.getComputedStyle(this.oParentUl,null)['height'];
                this.liArr=this.oParentUl.getElementsByTagName(childtags);
                for(var i=0;i<this.liArr.length;i++){
                        this.liArr.style.cssText +=';margin-top:0;height:'+this.oUlH+';line-height:'+this.oUlH+';display:block; width:100%;';

                }
                this.go =setInterval(
                         function(obj,id,delay){
                        return function(){obj.run(id,delay)}
                }(this,id,delay),100);
                this.oParentUl.onmouseover=function(obj){return function(){clearTimeout(obj.timeout);clearTimeout(obj.go);};}(this);
                this.oParentUl.onmouseout=function(obj){return function(){obj.go =setInterval(function(obj,id,delay){return function(){obj.run(id,delay)};}(obj,id,delay),100);};}(this);

        }
}
rollText.start('rollBox','li',3000);
function clone(){};
clone.prototype= rollText;
</script>



請問各位大神,這段代碼如何修改才能讓他最多能顯示出5行數(shù)據(jù),現(xiàn)在只能顯示1行,應(yīng)該調(diào)一下哪些數(shù)字大小?

小白一個,不懂代碼,求大神幫忙修改一下吧











作者: allthebest    時間: 2021-9-12 22:49
聯(lián)系代碼作者問問吧
作者: xiaoyun1981    時間: 2021-9-13 07:35
這是在網(wǎng)上找的,沒有作者




歡迎光臨 Discuz! 官方交流社區(qū) (http://www.9999xn.com/) Powered by Discuz! W1.0