Demo
Code:
http://testduat.forumvi.com/?tt=1
Cách làm
Vào index_body thêm vào trước {CHATBOX_TOP} code sau :
Code:
<style>
#js-news2 {
display: inline-block;
width: 98%; //Chỉnh hợp với forum bạn //
padding: 6px;
margin-bottom: 7px;
color: white;
box-shadow: 0 0 4px #DDD;
padding-top: 8px;
padding-left: 12px;
border: 1px solid #ccc;
border-radius: 4px;
background: url(http://www.freelargeimages.com/wp-content/uploads/2015/06/White_Background_01.jpg) left;
}
#js-news li {
display: inherit;
}
#js-news a {
font-size: 15px;
color: rgba(102, 102, 102, 0.83);
float: left;
margin-right: 21px;
font-weight: bold;
}
#js-news a:before {
content: '\f111';
font-family: fontawesome;
font-size: 4px;
color: #464c55;
margin-right: 5px;
position: relative;
top: -3px;
border: 2px solid rgba(151, 155, 160, 0.75);
border-radius: 100px;
}
</style>
<div id="js-news2">
<marquee direction="right" scrollamount="7" onmouseover="this.stop()" onmouseout="this.start()"><ul id="js-news" class="js-hidden">
</ul></marquee></div>
<script>$(function () {
$.ajax({url: "/feed/",success: function (a) {
$(".news-item").after('<ul id="js-news">');
22 < $(a).find("title").length ? so = 22 : so = $(a).find("title").length;for (i = 2; i < so; i++)
$('<li><a href="' + $(a).find("link:eq(" + i + ")").text() + '">' + $(a).find("title:eq(" + i + ")").text() + "</a></li>").appendTo("#js-news")}})});</script>
Xong rồi , thấy hay thì +1 nhé !
Được sửa bởi trandangduat ngày 9/4/2016, 19:07; sửa lần 3.