[英]how to make text scroll ( like text to slide by clicking prev n next icon) through javascript and jQuery
enter image description here 在此处输入图片说明
HOw to make text moving by clicking previous icon and next icon?like image slider...i want only 10 text to visible..rest all r to hide...nd by clicking all should appear.... i dont know javascript please help me!! 如何通过单击上一个图标和下一个图标来使文本移动?例如图像滑块...我只希望显示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>
Have a look at this: http://jsbin.com/dopudeduto/edit?html,css,js,output 看看这个: http : //jsbin.com/dopudeduto/edit?html,css,js,output
Let me know if you have any problems with this solution. 如果您对此解决方案有任何疑问,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.