bootstrap+handlebars+velocity实现图片列表悬浮放大显示文字交互效果代码
代码语言:html
所属分类:图片放大
代码描述:bootstrap+handlebars+velocity实现图片列表悬浮放大显示文字交互效果代码
代码标签: bootstrap handlebars velocity 图片 列表 悬浮 放大 显示 文字 交互
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.3.3.4.css"> <style> @import url(https://fonts.googleapis.com/css?family=Ubuntu:700); .item { cursor: pointer; -webkit-backface-visibility: hidden; } .item:hover > .overflow > .content-art { transform: translateY(0) translateZ(0); } .overflow { overflow: hidden; position: relative; width: 100%; height: 100%; } .content-art { background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%); color: #fff; font-weight: 700 !important; text-align: center; text-shadow: 0 1px 1px #000; padding: 10px 15px; position: absolute; left: 0; bottom: 0; width: 100%; height: auto; z-index: 100; -webkit-backface-visibility: hidden; transform: translateY(100%) translateZ(0); transition: transform 450ms ease-out; } .nopadding { padding: 0 !important; margin: 0 !important; } *, *:after, *:before { box-sizing: border-box; } html, body { width: 100%; height: 100%; } html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizelegibility; } body { background: #1f253d; font-family: "Ubuntu", sans-serif; } </style> </head> <body translate="no"> <div class="container-fluid"> <div id="content" class="row"></div> </div> <script id="template" type="text/x-handlebars-template"> {{#gallery}} <div class="col-md-4 col-lg-3 col-xs-6 item nopadding"> <div class="overflow"> <div class="content-art"> <h4>{{title}}</h4> </div> <img src="{{img}}" alt="{{alt}}" class="img-responsive"/> </div> </div> {{/gallery}} </script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.2.11.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/velocity.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/b.........完整代码请登录后点击上方下载按钮下载查看
网友评论0