Lightbox album Display effect

Source: Internet
Author: User

<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title>lightbox Photo Album show effect </title>
<link rel= "stylesheet" type= "text/css Course" href= "Lightbox/css/jquery.lightbox-0.5.css"/>
<link rel= "stylesheet" type= "Text/css" href= "Demo.css"/>
<script type= "text/web Effects" src= "Http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script >
<script type= "Text/javascript" src= "Lightbox/js/jquery.lightbox-0.5.pack.js" ></script>
<script type= "Text/javascript" src= "Script.js" ></script>

<body>

<div id= "Container" >

<div id= "Heading" >
</div>

<div id= "Gallery" >

<?php

$directory = ' gallery ';

$allowed _types=array (' jpg ', ' jpeg ', ' gif ', ' PNG ');
$file _parts=array ();
$ext = ';
$title = ';
$i = 0;

$dir _handle = @opendir ($directory) or Die ("There is a error with your image directory!");

while ($file = Readdir ($dir _handle))
{
if ($file = = '. ' | | $file = = '; ') continue;

$file _parts = Explode ('. ', $file);
$ext = Strtolower (Array_pop ($file _parts));

$title = Implode ('. ', $file _parts);
$title = Htmlspecialchars ($title);

$nomargin = ';

if (In_array ($ext, $allowed _types))
{
if (($i + 1)%4==0) $nomargin = ' Nomargin ';

Echo '
<div class= "Pic '. $nomargin." "Style=" Background:url ('. $directory. /'. $file. ') No-repeat 50% 50%; " >
<a href= "'. $directory. ' /' $file. ' title= '. $title. ' "target=" _blank ">". $title. ' </a>
</div> ';

$i + +;
}
}

Closedir ($dir _handle);

?>
<div class= "Clear" ></div>
</div>
</div>
</body>

SOURCE Download Address
Http://down.111cn.net/down/code/js/2010/0904/20632.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.