请注意本插件将使用非常现代的CSS 属性,所以想要的效果将只是工作在最新的浏览器版本。
引用所需要的样式
1 2 3 | < link rel = "stylesheet" type = "text/css" href = "css/normalize.css" /> < link rel = "stylesheet" type = "text/css" href = "css/demo.css" /> < link rel = "stylesheet" type = "text/css" href = "css/component.css" /> |
以及所需要的js文件
1 2 3 | < script src = "js/classie.js" ></ script > < script src = "js/boxesFx.js" ></ script > < script src = "js/modernizr.custom.js" ></ script > |
html结构
1 2 3 4 5 6 | < div id = "boxgallery" class = "boxgallery" data-effect = "effect-1" > < div class = "panel" >< img src = "img/1.jpg" alt = "Image 1" /></ div > < div class = "panel" >< img src = "img/2.jpg" alt = "Image 2" /></ div > < div class = "panel" >< img src = "img/3.jpg" alt = "Image 3" /></ div > < div class = "panel" >< img src = "img/4.jpg" alt = "Image 4" /></ div > </ div > |
调用插件
1 2 3 | <script> new BoxesFx( document.getElementById( 'boxgallery' ) ); </script> |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com