Jq scrollTop

Why doesn"t scrollTop work

<div class="box">
    <ul class="ul1" style="position: relative;top: 0;">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
    </ul>
</div>
*{margin:0;padding:0;}
li{list-style: none;}
.box{width: 200px;height:30px;margin: 100px auto;background-color: -sharpccc;text-align: center;
    overflow: hidden;}
.box li{line-height: 30px;}
<script>
    //1
    $(function () {
        var num = 0;
        setInterval(function(){
            num-=30;
            $(".ul1").animate({"scrollTop":num},50)
        },1000);
    })
</script>
Apr.26,2022

num-= 30;
= >
num + = 30;

.ul1 {overflow: auto; height: 30px;}


ul has no height?


.box {position:relative;}
.box ul {position:absolute; left:0;}

< ul class= "ul1" style= "top:0;" >

this is reasonable

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaf616-224d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaf616-224d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?