I am struggling to figure out how to hide the overflow text that is spilling out of the div. I attempted using overflow: hidden;
, but unfortunately, it didn't work as expected. Additionally, I would like the text to loop back to the beginning once it reaches the end, for example, displaying
<a href="'#">link1</a> some text...<br><br>
after showing <a href="'#">link8</a> some text 3!....<br><br>
. My CSS skills are limited, so any guidance on how to achieve this would be greatly appreciated.
#container {
position: fixed;
font-size: 20px;
transition: .2s;
margin-top: 10px;
transition: margin 1s;
}
#box:hover #container{
overflow: hidden;
margin-top: -3500px;
transition: margin 400s linear;
}
<div style="background-color: rgb(162, 0, 255); height: 400px;" id="box">
<div id="container">
<a href="'#">link1</a> some text...<br><br>
<a href="'#">link2</a> some more text 2....<br><br>
<a href="'#">link3</a> some text 3....<br><br>
<a href="'#">link4</a> some text 3....<br><br>
<a href="'#">link5</a> some text 3....<br><br>
<a href="'#">link6</a> some text 3....<br><br>
<a href="'#">link7</a> some text 3....<br><br>
<a href="'#">link8</a> some text 3!....<br><br>
</div>