The rolling effect is very good and the code is very simple, so there won’t be much nonsense here. Copy code The code is as follows: //Style file: <br> * {<br> margin: 0;<br> padding: 0;<br> }<br> .scrollNews {<br> width: 100%;<br> Height: 20px;<br> overflow: hidden;<br> background: #FFFFFF;<br> Border: 0px solid #AAAAAA;<br> }<br> .scrollNews ul {<br> padding: 2px 5px 5px 25px;<br> }<br> .scrollNews ul li {<br> Height: 20px;<br> list-style-type: none;<br> font-size: small;<br> }<br> a {<br> text-decoration: none;<br> }<br> <br> </div> Header js<p> </p>Don’t forget to import the jquery library<p> </p> <p></p> <div class="codetitle"> <span><a style="CURSOR: pointer" data="73947" class="copybut" id="copybut73947" onclick="doCopy('code73947')">Copy code<u></u></a> The code is as follows:</span><div class="codebody" id="code73947"> <br> $(function () {<br> var settime;<br> $(".scrollNews").hover(function () {<br> Clearinterval (settime); <br> }, function () {<br> settime = setInterval(function () {<br> Var $ first = $ (". Scrollnews ul: first"); // Select the first ul under the div instead of li; <br> var height = $first.find("li:first").height(); // Get the height of the first li and prepare for the ul to move upward; $first.animate({ "marginTop": -height "px" }, 600, function () {<br> $ First.css ({margintop: 0}). Find ("li: first"). });<br> }, 3000);<br> }). Trigger ("mouseLeave"); // trigger () method of the trigger () method is to trigger the type of events of the selected element <br> });<br> <br><br> </div>jsp text area <p></p> <p></p> <div class="codetitle"><span>Copy code<a style="CURSOR: pointer" data="51921" class="copybut" id="copybut51921" onclick="doCopy('code51921')"><u></u> The code is as follows:</a></span></div> <div class="scrollNews"><div class="codebody" id="code51921"> <img width="20" height="15" src="img/laba.png" align="left"><br> <li><a class="tooltip" title="Query module menu name update announcement: Starting from 2015-02-09, the query module menu will use a new name. For details, please refer to the [New and old name comparison table of query module] below. "><br> Query module menu name update announcement: Starting from 2015-02-09, the query module menu uses a new name. For details, please refer to the [New and old name comparison table of query module] below.</a><br> <li><a class="tooltip" title="Query module menu name update announcement: Starting from 2015-02-09, the query module menu will use a new name. For details, please refer to the [New and old name comparison table of query module] below. "><br> Query module menu name update announcement: Starting from 2015-02-09, the query module menu uses a new name. For details, please refer to the [New and old name comparison table of query module] below.</a><br> </div><br> <br><br> <br>Friends, feel free to use it in your own projects<br> </div> </div>