我该如何处理next和prev按钮?

时间:2017-04-28 14:59:52

标签: html gallery

我想,目录中的所有图像都显示为带有下一个 - 上一个按钮的画廊。

但是我不知道我是如何用按钮做的:这里是我的代码:



    <?php
                $event = $_GET["event"];
                $ordner = "fotos/" . $event;
                
 
$dir = opendir($ordner);   
$extensions = array("jpg", "bmp", "gif", "jpeg", "png");  

while(($file = readdir($dir)) !== false) 
    {   
    if(in_array(pathinfo($file, PATHINFO_EXTENSION), $extensions)) 
        {  
          
   
?>
                
                <li>
						<a href="#<?php echo $file; ?>">
							<img style="height: auto; width: 100%;" src="<?php echo "fotos/". $event."/" .$path.$file; ?>" alt="<?php echo $file; ?>">
							<span>Pointe</span>
						</a>
						<div  class="lb-overlay" id="<?php echo $file; ?>">
							<img  src="<?php echo "fotos/". $event."/" .$path.$file; ?>" alt="image01" />
							<div>
							
								<a href="#29.jpg" class="lb-prev">Prev</a>
								<a href="#1.jpg" class="lb-next">Next</a>
							</div>
							<a href="#page" class="lb-close">x Close</a>
						</div>
					</li>
   
                
                
                
                
                
                
<?php  
                         }   
    }  
 
                    ?>
&#13;
&#13;
&#13;

对不起我的英文..我是奥地利人。

0 个答案:

没有答案
相关问题