Jump to content
php.lv forumi

Lightbox


xfr33

Recommended Posts

Daži jautājumi par lightbox uzlikšanu.

Add rel="lightbox" attribute to any link tag to activate the lightbox. For example:

 

<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

 

Lūk šī te vieta. Tas links kas ir uz bildes ir pilnīgi vienalga kāds? Pēc tam viņš tiks izmantots?

 

# You can use CSS to style the image container. Here is the code used in the examples above:

 

#lightbox{

background-color:#eee;

padding: 10px;

border-bottom: 2px solid #666;

border-right: 2px solid #666;

}

#lightboxDetails{

font-size: 0.8em;

padding-top: 0.4em;

}

#lightboxCaption{ float: left; }

#keyboardMsg{ float: right; }

 

#lightbox img{ border: none; }

#overlay img{ border: none; }

 

# To create the 'shadow' effect over the page, you'll need to use a PNG file and some extra CSS. The CSS is a bit messy thanks to IE's unorthodox support of PNG transparency:

 

#overlay{ background-image: url(overlay.png); }

 

* html #overlay{

background-color: #000;

back\ground-color: transparent;

background-image: url(blank.gif);

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale");

}

 

# If you would like to show the user a 'loading' graphic, like the animated progress bar in the examples above, specify its location at the top of the lightbox.js file.

 

var loadingImage = 'loading.gif';

 

# In the same vein, if you would like to use a 'close button', like the 'X' graphic in the examples above, specify its location at the top of the lightbox.js file.

 

var closeButton = 'close.gif';

 

un šie kodi, kurā vietā jāvada iekšā? body tagā? vai kur?

Link to comment
Share on other sites

xfr33, pierādi, ka Tu kaut ko vari pats! Pašam būs interesantāk, un citus tik ļoti netracināsi. (Neprasi, lai parāda "kur ko likt", bet stāsti, tieši ko Tu nesaproti.)

Edited by black
Link to comment
Share on other sites

×
×
  • Create New...