FancyBox is a lightbox tool for displaying images, HTML content, and multimedia.
jquery plug-ins fancybox pop-up box effects, and widely used Lightbox plug-in comparison class, you can show a single picture, you can also display a group of pictures, it can also show the content of the custom and Ajax loaded with the contents of external files, etc., the function is very convenient and practical.
Demo effect (image gallery):
Sample Code:
<link href= "~/content/jquery.fancybox.css" rel= "stylesheet"/>
<p>
<script src= "~/scripts/jquery-2.1.4.min.js" ></script>
<script src= "~/scripts/" Jquery.fancybox.pack.js "></script>
<script type=" Text/javascript ">
$ (document). Ready ( function () {
$ (". Fancybox1"). FancyBox ();
</script>
Demo effect (single images):
Sample Code:
<link href= "~/content/jquery.fancybox.css" rel= "stylesheet"/> <p>
<script src= "~/scripts/jquery-2.1.4.min.js" ></script>
<script src= "~/scripts/" Jquery.fancybox.pack.js "></script>
<script type=" Text/javascript ">
$ (document). Ready ( function () {
$ ("#single_1"). FancyBox ({
helpers: {
title: {
type: ' Float '}}}
);
$ ("#single_2"). FancyBox ({
openeffect: ' Elastic ',
closeeffect: ' Elastic ',
helpers: {
title: {
Type: ' Inside '}}}
);
$ ("#single_3"). FancyBox ({
openeffect: ' None ',
closeeffect: ' None ',
helpers: {
title: {
Type: ' Outside '}}}
);
$ ("#single_4"). FancyBox ({
helpers: {
title: {
type: ' Over '
}}}); </script>
Demo effect (thumbnail):
Sample Code:
<link href= "~/content/jquery.fancybox.css" rel= "stylesheet"/> <link href= "~/content/" Jquery.fancybox-thumbs.css "rel=" stylesheet "/> <p>
<script src= "~/scripts/jquery-2.1.4.min.js" ></script>
<script src= "~/scripts/" Jquery.fancybox.pack.js "></script>
<script src=" ~/scripts/jquery.fancybox-thumbs.js "></ script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ (". Fancybox-thumb") . FancyBox ({
preveffect: ' Elastic ',
nexteffect: ' Elastic ',
helpers: {
title: {
type: ' Inside ')
},
thumbs: {
width:50,
height:50
}
}}); </script>
The above is the 3 jquery plug-ins FancyBox image Amplification Display effect of the Web page effects, the application of simple, compatible IE6 old version level browser. Picture magnification only fits the size and automatically centers the window. (Compatibility test: IE6 and above, Firefox, Chrome, Opera, Safari, 360 and other mainstream browsers)