Very practical baguetteBox. js image pop-up layer,

Source: Internet
Author: User

Very practical baguetteBox. js image pop-up layer,

The lightbox JS plug-in, baguetteBox. js, is an image display effect created using pure Javascript. It has an image that is zoomed in and out and has a corresponding CSS3, and can be perfectly displayed on touch screens and other devices.

BaguetteBox. js advantages
Javascript is complete and does not require jQuery library support
Supports touch screen mobile phones
Displays titles and descriptions.
Supports responsive effects
Supports CSS3 transition
Use the SVG button to download no unnecessary files
Only 2 kb after gzip compression is enabled

Online instance
Default Fade in and out Response Image
Usage
<Div class = "header large"> <ul class = "nav"> <li> <a class = "cur" href = "#" title = "Homepage"> homepage </a> </li> <a href = "#" title = "template"> website template </a> </li> <a href = "#" title = "webpage effects"> webpage effects </a> </li> <a href = "#" title = "website psd"> website psd </a> </li> </ul> </div>

  

Copy

We place multiple clickable thumbnails on the page, and add the link href attribute and data-caption title to tag.

<div class="baguetteBox">     <a href="img/1-1.jpg" data-caption="Golden Gate Bridge"></a>     <a href="img/1-2.jpg" title="Midnight City"></a>    ...... </div>
$(function(){     baguetteBox.run('.baguetteBox', {         //options     }); });
Parameter Details
Parameters Description Default Value
Captions Show Image Description True
Buttons Display button. Optional values: 'auto', true, and false. Auto
Async Asynchronously load files False
Preload Number of images to be preloaded 2
Animation Animation Mode. Options include slideIn and fadeIn. SlideIn
Download

 

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.