![](/img/trans.png)
[英]how to make next button, prev button in html to scroll a lot of elements in div?(use jquery, javascript)
[英]how to make text scroll ( like text to slide by clicking prev n next icon) through javascript and jQuery
如何通過單擊上一個圖標和下一個圖標來使文本移動?例如圖像滑塊...我只希望顯示10個文本。請幫我!!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" />
<style>
.new_line {
width:780px;
margin:0 auto;
height:50px;
}
.new_line ul li {
list-style-type:none;
float:left;
padding:10px 22px ;
}
.new_line ul li img {
float:left;}
</style>
</head>
<body>
<div class="new_line">
<ul>
<li> <img src="next.png"/> </li>
<!--<li> <a href="#"> text 1</a> </li>
<li> <a href="#"> text 2</a></li>-->
<li> <a href="#"> text 3</a></li>
<li> <a href="#"> text 4</a></li>
<li> <a href="#"> text 5</a></li>
<li> <a href="#"> text 6</a></li>
<li> <a href="#"> text 7</a></li>
<li> <a href="#"> text 8</a></li>
<li> <a href="#"> text 9</a></li>
<li> <a href="#"> text 10</a></li>
<!--<li> <a href="#"> text 11</a></li>
<li> <a href="#"> text 12</a></li>-->
<li> <img src="prev.png"/> </li>
</ul>
</div>
</body>
</html>
看看這個: http : //jsbin.com/dopudeduto/edit?html,css,js,output
如果您對此解決方案有任何疑問,請告訴我。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.