jquery - How to write the code for slider image -
<?php $query1="select * user_photos_offline ssmid='$ssmid' , status='1' order date_uploaded desc limit 0,5"; $sql=mysql_query($query1); $count=mysql_num_rows($sql); $results=array(); while($row=mysql_fetch_assoc($sql)){ // $results[]=$row['image']; ?> <img src="upload_images/<?php echo $row['image']?>" class="img-responsive image" onclick="showimg('upload_images/<?php echo $row['image']?>')"> <!-- here got images,now showing in row row,but dont want this,i want row , remaining photos come slider, idont know how write code--> <?php } ?>
friends ,i want write code image slider,i dont know how write code slider image,for me no need plugin,see below explained...
you can try below code.
@keyframes slidy { 0% { left: 0%; } 20% { left: 0%; } 25% { left: -100%; } 45% { left: -100%; } 50% { left: -200%; } 70% { left: -200%; } 75% { left: -300%; } 95% { left: -300%; } 100% { left: -400%; } } body { margin: 0; } div#slider { overflow: hidden; } div#slider figure img { width: 20%; float: left; } div#slider figure { position: relative; width: 500%; margin: 0; left: 0; text-align: left; font-size: 0; animation: 30s slidy infinite; }
Comments
Post a Comment