using CSS and setinterval, I need to move the text downwards with a "start" button. suppose, there is a text box and when I press the start button the text should move downwards and when I press stop button, it should stop the text motion.
<style>
.class1{
position: relative;
padding-top: 10px;
}
<body>
<p input id="para">Paragraph</p>
<button id="srt" onclick="start()">Start</button>
<button id="stp" onclick="stop()">Stop</button>
<script>
var i=document.getElementById("para");
setInterval(function start(){
i.className="class1";
},1000)
</script>
</body>